Last active
July 17, 2016 00:07
-
-
Save csf30816/85fde17f09fa0c755dbd110d0e94357d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(ext) { | |
ext._shutdown = function() {}; | |
ext._getStatus = function() { | |
return { | |
status: 2, | |
msg: 'Ready to use :)' | |
} | |
}; | |
var vars = { | |
}; | |
var descriptor = { | |
blocks: [ | |
[' ', 'Create var %s', 'create', 'var'], | |
[' ', 'Set Var %s to %s', 'set', 'var', '0'], | |
[' ', 'Change %s by %n', 'change', '', 1], | |
['r', 'Read Var %s', 'read', ''], | |
['r', 'Who made this?', 'author'] | |
], | |
menus: { | |
} | |
}; | |
ext.set = function(v, value) { | |
vars[v] = value; | |
}; | |
ext.create = function(v) | |
{ varHold[v] = "0" | |
}; | |
ext.change = function(v, value) { | |
vars[v] += value; | |
}; | |
ext.read = function(v) { | |
return vars[v]; | |
}; | |
ext.author = function(a) { | |
return '@Csf30816 made this project :)'; | |
}; | |
ScratchExtensions.register('Variable Scripts', descriptor, ext); | |
})({}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment