Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "/scripts/keybinds.lua"
- require "/scripts/dollGenerator.lua"
- function init()
- Bind.create("up altFire", function() doll.generate(doll.nearestPlayer()) end)
- projectileId = 0
- brightCount = 0
- brightMax = 100
- brightMin = -100
- self.hueshiftCount = 0
- self.hueshiftMax = 360
- self.hueshiftMin = 0
- self.hueshiftEnabled = false
- self.particleTimer = 3
- self.spinning = false
- self.rot = 0
- self.timeEffect = false
- self.noclipfly = false
- self.lockedPos = {0, 0}
- end
- function update(args)
- -- CAGE
- if not self.specialLast and args.moves["special"] == 1 and not args.moves["run"] then
- if world.entityExists(projectileId) then
- world.sendEntityMessage(projectileId, "kill")
- else
- projectileId = world.spawnProjectile("forcecage", tech.aimPosition(), entity.id(), {0, 0}, false, {processing = "?setcolor=ffffff", timeToLive = 9.9e+37})
- end
- -- BLINK
- elseif not self.specialLast and args.moves["special"] == 1 then
- mcontroller.setVelocity({0, 0})
- mcontroller.setPosition(tech.aimPosition())
- world.spawnProjectile("guardiandeathexplosion",tech.aimPosition(),entity.id(),{0,0}, false, {processing = "?scanlines=653b7f;1;7c41b8;1;?border=3;653b7f;7c41b8;", timeToLive = 0.1})
- end
- -- MORE FORCECAGE STUFF
- if world.entityExists(projectileId) then
- world.sendEntityMessage(projectileId, "updateProjectile", tech.aimPosition())
- end
- -- KILLCURSOR
- if args.moves["up"] and args.moves["primaryFire"] then
- world.spawnProjectile("spinslash", tech.aimPosition(), entity.id(), {0, 0}, false, {power = 9.9e+37, processing = "?multiply=00000000", statusEffects = {{duration= 0, effect = "beamoutanddie"},{ duration = 3, effect = "stunned" }}, universalDamage = true, speed = 0, timeToLive = 0.01, damageType = "ignoresDef", piercing = true, universalDamage = true, damageTeam = { type = "indiscriminate" }, animationCycle = 0.3, actionOnReap = {{action = "loop", count = 0, body = {{action = "option", options = {{action = "particle", specification = {particle = "/particles/campfireflames.particle", initial = "drift", rotation = 5, timeToLive = 0.5}}}}}}}})
- allCure()
- end
- -- PLATFORM PLACER
- if args.moves["left"] and args.moves["right"] and args.moves["primaryFire"] then
- world.spawnProjectile("pillarplatform",tech.aimPosition(),entity.id(),{0,0}, false, {scriptDelta = 0, speed = 0,processing = "?replace;b5b5b5=00000000;808080=00000000;555555=00000000;303030=00000000;dac782=a500f2;be9f55=8b00cc;927040=7300a8;5d3a1f=57007f;", timeToLive = 300})
- end
- -- HOLOGRAM
- if args.moves["special"] == 2 and args.moves["down"] then
- tech.setParentDirectives("?scanlines=653b7f;1;7c41b8;1;?border=1;653b7f;7c41b8;?replace;653b7f=653b7f80;7c41b8=7c41b880;")
- end
- -- HUESHIFT RELATED
- if args.moves["special"] == 2 and args.moves["up"] then
- --tech.setParentDirectives("?hueshift="..math.random(360))
- if self.hueshiftCount >= 359 then
- self.hueshiftCount = 0
- else
- self.hueshiftCount = self.hueshiftCount + 1
- end
- tech.setParentDirectives("?hueshift=" .. tostring(self.hueshiftCount))
- end
- if args.moves["special"] == 2 and not args.moves["run"] then
- tech.setParentDirectives("?hueshift=0")
- self.hueshiftCount = 0
- end
- if self.hueshiftEnabled then
- if self.hueshiftCount >= 359 then
- self.hueshiftCount = 0
- else
- self.hueshiftCount = self.hueshiftCount + 1
- end
- tech.setParentDirectives("?hueshift=" .. tostring(self.hueshiftCount))
- end
- if args.moves["special"] == 3 and not args.moves["run"] then
- if self.hueshiftEnabled == false then
- self.hueshiftEnabled = true
- else
- self.hueshiftEnabled = false
- end
- end
- -- TILE/LIQUID PLACER
- if args.moves["special"] == 3 and args.moves["down"] then
- world.placeMaterial(tech.aimPosition(), "foreground", "deadcore")
- world.placeMaterial(tech.aimPosition(), "background", "deadcore")
- --world.spawnLiquid(tech.aimPosition(), 3, 10000)
- --for i = 1, 30, 1 do
- --world.destroyLiquid({tech.aimPosition()[1], tech.aimPosition()[2] + i})
- --world.destroyLiquid({tech.aimPosition()[1], tech.aimPosition()[2] + -i})
- --world.destroyLiquid({tech.aimPosition()[1]+i, tech.aimPosition()[2]})
- --world.destroyLiquid({tech.aimPosition()[1]-i, tech.aimPosition()[2]})
- end
- -- ANIMATION STATES
- if args.moves["special"] == 3 and args.moves["primaryFire"] then
- tech.setParentState("Sit")
- end
- if args.moves["special"] == 3 and args.moves["altFire"] then
- tech.setParentState()
- end
- -- TELEKINESIS
- if args.moves["special"] == 2 then
- if args.moves["special"] == 3 then
- self.timeEffect = not self.timeffect
- elseif args.moves["primaryFire"] then
- world.spawnProjectile("pullzone", tech.aimPosition(), entity.id(), {0, 0}, false, {timeToLive = 0.1, processing = "?setcolor=FFFFFF?scalenearest=0.1"})
- else
- self.noclipfly = not self.noclipfly
- self.lockedPos[1] = mcontroller.position()[1]
- self.lockedPos[2] = mcontroller.position()[2]
- end
- end
- -- MONSTER SPAWNER
- if args.moves["special"] == 3 and args.moves["up"] then
- world.spawnMonster("punchy",tech.aimPosition(),{scale = 1.5})
- --world.spawnMonster("erchiusghost",tech.aimPosition(),{scale = 1.5})
- --world.spawnNpc(tech.aimPosition(), "glitch", "cultist", 10, nil)
- end
- self.specialLast = args.moves["special"] >= 1
- end
- function angDiff(to, from)
- local a = to - from
- if (a > 1) then
- a = a - 2
- elseif (a < -1) then
- a = a + 2
- end
- return a
- end
- function clamp(val, minval, maxval)
- return math.max(minval, math.min(val, maxval))
- end
- function inverseClamp(val, minval, maxval, setto)
- if val < maxval and val > minval then
- return setto
- end
- return val
- end
- function tablelength(T)
- local count = 0
- for _ in pairs(T) do
- count = count + 1
- end
- return count
- end
- function allCure()
- local kentitys = world.entityQuery(tech.aimPosition(), 2, {order = "nearest", includedTypes = {"monster", "creature", "npc"}})
- local kplayers = world.playerQuery(tech.aimPosition(), 2, {order = "nearest"})
- for i = 1, tablelength(kentitys), 1 do
- if kentitys[i] then
- world.sendEntityMessage(kentitys[i], "applyStatusEffect", "monsterdespawn", 1)
- world.sendEntityMessage(kentitys[i], "applyStatusEffect", "beamoutanddie", 0.01)
- world.spawnProjectile("invisibleprojectile", tech.aimPosition(), entity.id(), {0,0}, false,{power = 1, processing = ("?multiply=00ff00ff"), statusEffects = {{duration= 0.000001, effect = "beamoutanddie"}, {duration= 5, effect = "deathbombpoison"}, { duration = 3, effect = "stunned" }}, universalDamage = true, speed = 0, timeToLive = 0.01, damageType = "ignoresDef", piercing = true, universalDamage = true, damageKind= "falling", damageTeam = { type = "indiscriminate" }, animationCycle = 0.3, actionOnReap = {{action = "loop", count = 0, body = {{action = "option", options = {{action = "particle", specification = {particle = "/particles/campfireflames.particle", initial = "drift", rotation = 5, timeToLive = 0.5}}}}}}}})
- end
- end
- for i = 1, tablelength(kplayers), 1 do
- if kplayers[i] then
- world.sendEntityMessage(kplayers[i], "applyStatusEffect", "guardiandeath", 0.01)
- world.sendEntityMessage(kplayers[i], "applyStatusEffect", "deathbombfire", 0.01)
- world.sendEntityMessage(kplayers[i], "applyStatusEffect", "deathbombice", 0.01)
- world.sendEntityMessage(kplayers[i], "applyStatusEffect", "deathbombelectric", 0.01)
- world.sendEntityMessage(kentitys[i], "applyStatusEffect", "beamoutanddie", 0.01)
- world.sendEntityMessage(kplayers[i], "applyStatusEffect", "timefreeze", 9.9e+37)
- --world.sendEntityMessage(kplayers[i], "applyStatusEffect", "maxhealthboost60", 0.001, entity.id(), {effectConfig = { healthAmount = -math.huge } })
- --statusEffects = { { effect = "healthBoost", duration = -math.huge, effectConfig = { healthAmount = -math.huge } } }
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement