Advertisement
Ultroman

Freezer Mod with Auto Stack fix

Jun 4th, 2021
1,486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. local function spawnice(inst)
  2.     inst:DoTaskInTime(0, function(inst)
  3.     inst.SoundEmitter:PlaySound("dontstarve/common/teleportato/teleportato_powerup", "teleportato_on")
  4. end)
  5.     inst:DoTaskInTime(1, function() onopen(inst)
  6. end)
  7.     inst:DoTaskInTime(1.5, function(inst)
  8.     local ice = SpawnPrefab("ice")
  9.     local ice2 = SpawnPrefab("ice")
  10.     local ice3 = SpawnPrefab("ice")
  11.     local pt = Vector3(inst.Transform:GetWorldPosition()) + Vector3(0,2,0)
  12.     ice.Transform:SetPosition(pt:Get())
  13.     ice2.Transform:SetPosition(pt:Get())
  14.     ice3.Transform:SetPosition(pt:Get())
  15.     local down = TheCamera:GetDownVec()
  16.     local angle = math.atan2(down.z, down.x) + (math.random()*60)*DEGREES
  17.     local sp = 3 + math.random()
  18.     ice.Physics:SetVel(sp*math.cos(angle), math.random()*8+12, sp*math.sin(angle))
  19.     ice2.Physics:SetVel(sp*math.cos(angle), math.random()*6+12, sp*math.sin(angle))
  20.     ice3.Physics:SetVel(sp*math.cos(angle), math.random()*12+8, sp*math.sin(angle))
  21. end)
  22.     inst:DoTaskInTime(2, function() onclose(inst)
  23.     end)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement