Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = script.Parent.Parent
- repeat wait(.03) until Player.Character
- local char = Player.Character
- run = game:GetService("RunService")
- step = run.Heartbeat
- cn = CFrame.new
- ca = CFrame.Angles
- r = math.rad
- pi = math.pi
- player = game.Players:GetPlayerFromCharacter(char)
- function Tween(easingFunction, duration, callback)
- local tick = tick
- local dur = 0
- local ratio = 0
- local start = tick()
- local wait = wait
- while (dur < duration) do
- local ratio = easingFunction(dur, 0, 1, duration)
- dur = (tick() - start)
- callback(ratio)
- wait()
- end
- callback(1)
- end
- function TweenVector3(Part, Property, NewProperty, Duration, easingFunction)
- local orig = Part[Property]
- local dif = NewProperty - Part[Property]
- local function callback(ratio)
- Part[Property] = orig + Vector3.new(
- dif.x * ratio,
- dif.y * ratio,
- dif.z * ratio
- )
- end
- Tween(easingFunction, Duration, callback)
- end
- function TweenSize(Part, Property, NewProperty, Duration, easingFunction)
- local cf = Part.CFrame
- local orig = Part[Property]
- local dif = NewProperty - Part[Property]
- local function callback(ratio)
- Part[Property] = orig + Vector3.new(
- dif.x * ratio,
- dif.y * ratio,
- dif.z * ratio
- )
- Part.CFrame = cf
- end
- Tween(easingFunction, Duration, callback)
- end
- function TweenColor3(Part, Property, NewProperty, Duration, easingFunction)
- local orig = Part[Property]
- local dif = Color3.new(NewProperty.r - Part[Property].r, NewProperty.g - Part[Property].g, NewProperty.b - Part[Property].b)
- --print(dif)
- local function callback(ratio)
- --print(ratio)
- Part[Property] = BrickColor.new(
- orig.r + (dif.r*ratio),
- orig.g + (dif.g*ratio),
- orig.b + (dif.b*ratio)
- )
- end
- Tween(easingFunction, Duration, callback)
- end
- x = 0.1
- function playsound(id,location,volume,pitch,timed) local sound = Instance.new("Sound",location) sound.SoundId = "http://www.roblox.com/asset/?id=" .. id sound.Volume = volume sound.Pitch = pitch sound:Play() sound:Play() if timed > 0 then spawn(function() local soundl = sound for i = 1,timed*30 do run.Stepped:wait() end soundl:Stop() soundl:Destroy() end) end sound:Destroy() end
- function playobj(obj,location,timed) local sound = obj:clone() sound.Parent = location sound:Play() sound:Play() if timed and timed > 0 then spawn(function() local soundl = sound for i = 1,timed*30 do run.Stepped:wait() end soundl:Stop() soundl:Destroy() end) end sound:Destroy() end
- function w(t)
- for Waiting = 1,t*33 do
- wait(.03)
- end
- end
- function tabFind(tab, key)
- for i,v in pairs(tab) do
- if key == v then
- return i
- end
- end
- return nil
- end
- function clerp(motor,c2,ie,style)
- if style == "l" or style == nil then
- return motor.C0:lerp(c2, ie)
- elseif style == "s" then
- return motor.C0:lerp(c2, math.sin(ie * pi * 0.5))
- elseif style == "c" then
- return motor.C0:lerp(c2, 1 - math.cos(ie * pi * 0.5))
- elseif style == "ss" then
- return motor.C0:lerp(c2, ie*ie*ie * (ie * (6*ie - 15) + 10))
- end
- end
- head = char:FindFirstChild("Head")
- tor = char:FindFirstChild("Torso")
- rootp = char:FindFirstChild("HumanoidRootPart")
- ra = char:FindFirstChild("Right Arm")
- la = char:FindFirstChild("Left Arm")
- rl = char:FindFirstChild("Right Leg")
- ll = char:FindFirstChild("Left Leg")
- neck = tor:FindFirstChild("Neck")
- root = rootp:FindFirstChild("RootJoint") or rootp:findFirstChild("Root Hip")
- rs = tor:FindFirstChild("Right Shoulder")
- ls = tor:FindFirstChild("Left Shoulder")
- rh = tor:FindFirstChild("Right Hip")
- lh = tor:FindFirstChild("Left Hip")
- human = char:FindFirstChild("Humanoid")
- if not char:FindFirstChild("use") then
- use = Instance.new("BoolValue",char)
- use.Name = "use"
- use.Value = false
- end
- if char:FindFirstChild("use") then
- use = char.use
- end
- if not fake then
- fake = Instance.new("Part")
- fake.Size = tor.Size
- fake.Parent = tor
- fake.Transparency = 1
- fakew = Instance.new("Weld",tor)
- fakew.Part0 = tor
- fakew.Part1 = fake
- neckc0 = neck.C0
- rootc0 = root.C0
- rsc0 = rs.C0
- lsc0 = ls.C0
- rhc0 = rh.C0
- lhc0 = lh.C0
- end
- function reset(x2)
- for i = 0,1, x2 do
- neck.C0 = clerp(neck, neckc0, i)
- root.C0 = clerp(root, rootc0, i)
- rs.C0 = clerp(rs, rsc0, i)
- ls.C0 = clerp(ls, lsc0, i)
- rh.C0 = clerp(rh, rhc0, i)
- lh.C0 = clerp(lh, lhc0, i)
- wait(.03)
- end
- end
- function weld(l1,l2,l3,l4,l5)
- local tab = {l1,l2,l3,l4,l5}
- for _,v in pairs(tab) do
- v.Part0 = fake
- end
- end
- function dweld(l1,l2,l3,l4,l5)
- local tab = {l1,l2,l3,l4,l5}
- for _,v in pairs(tab) do
- v.Part0 = tor
- end
- end
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("Part") and v.Transparency == 0 then
- v.Touched:connect(function(hit)
- if (hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid") and (hit.Parent ~= char and hit.Parent.Parent ~= char)) and v:findFirstChild("Ice") == nil then
- local ice = Instance.new("Part", v)
- ice.Name = "Ice"
- ice.Size = v.Size / 2
- ice.CanCollide = false
- ice.Position = Vector3.new(0,1000,0)
- ice.Anchored = false
- ice.Material = "Ice"
- ice.TopSurface = 1
- ice.BottomSurface = 1
- ice.LeftSurface = 1
- ice.RightSurface = 1
- ice.FrontSurface = 1
- ice.BackSurface = 1
- ice.Transparency = 1
- local Mesh = Instance.new("BlockMesh", ice)
- Mesh.Scale = Vector3.new(2.1,2.1,2.1)
- if v.Name == "Head" then
- Mesh:Destroy()
- local newMesh = Instance.new("SpecialMesh", ice)
- newMesh.MeshType = "Head"
- newMesh.Scale = Vector3.new(2.5,2.5,2.5)
- end
- spawn(function()
- for i = 1,.4,-.1 do
- ice.Transparency = i
- wait(.03)
- end
- end)
- ice.BrickColor = BrickColor.new("Pastel blue-green")
- local weld = Instance.new("Motor6D", ice)
- weld.Part0 = v
- weld.Part1 = ice
- game.Debris:AddItem(ice, 3)
- wait(2)
- spawn(function()
- for i = .4,1,.1 do
- ice.Transparency = i
- wait(.03)
- end
- ice:Destroy()
- end)
- end
- end)
- end
- end
- local tool1 = Instance.new("Tool", player.Backpack)
- tool1.Name = "Ice Time"
- tool1.RequiresHandle = false
- tool1.Activated:connect(function()
- weld(rs,ls,rh,lh)
- human.WalkSpeed = 0
- for i = 0,1,.05 do
- rs.C0 = clerp(rs, rsc0 * ca(-math.pi/6,0,0), i, "ss")
- ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,0), i ,"ss")
- wait(.03)
- end
- local Ice = Instance.new("Part", workspace)
- Ice.Anchored = true
- Ice.Size = Vector3.new(1,.2,1)
- Ice.CFrame = rootp.CFrame * CFrame.new(0,-3,0)
- Ice.Transparency = 1
- Ice.CanCollide = false
- Ice.Material = "Ice"
- local Cylinder = Instance.new("CylinderMesh", Ice)
- Ice.BrickColor = BrickColor.new("Pastel blue-green")
- game.Debris:AddItem(Ice, 4)
- Ice.Touched:connect(function(hit)
- if hit.Parent:findFirstChild("Humanoid") and hit.Parent ~= char and hit.Anchored == false then
- --hit.Parent.Humanoid.WalkSpeed = 0
- --hit.Parent.Humanoid:TakeDamage(15)
- for i,v in pairs(hit.Parent:GetChildren()) do
- if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
- v.Anchored = true
- spawn(function()
- wait(4)
- v.Anchored = false
- end)
- end
- end
- end
- end)
- for i = 1,.2,-.05 do
- Ice.Size = Ice.Size + Vector3.new(2.5,0,2.5)
- Ice.CFrame = rootp.CFrame * CFrame.new(0,-3,0)
- Ice.Transparency = i
- wait(.03)
- end
- reset(.2)
- dweld(rs,ls,lh,rh)
- human.WalkSpeed = 16
- end)
- local tool2 = Instance.new("Tool", player.Backpack)
- tool2.Name = "Ice Spike"
- tool2.RequiresHandle = false
- tool2.Activated:connect(function()
- weld(rs,ls)
- for i = 0,1,.1 do
- rs.C0 = clerp(rs, rsc0 * ca(0,0,math.pi), i, "ss")
- ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,pi/8), i ,"ss")
- wait(.03)
- end
- local Pellet = Instance.new("Part", workspace)
- local Mesh = Instance.new("SpecialMesh", Pellet)
- Mesh.MeshId = "http://www.roblox.com/Asset/?id=9756362"
- Pellet.Size = Vector3.new(2,2,2)
- Pellet.CFrame = rootp.CFrame * CFrame.new(1,5,0)
- Pellet.Anchored = true
- Pellet.CanCollide = false
- Pellet.BrickColor = BrickColor.new("Pastel blue-green")
- Pellet.Transparency = .2
- for i = 1,5 do
- Pellet.Size = Pellet.Size + Vector3.new(1,2,1)
- Pellet.CFrame = (rootp.CFrame * CFrame.new(1,5,0)) * CFrame.Angles(0,0,math.pi/2)
- Mesh.Scale = Pellet.Size
- wait(.03)
- end
- weld(lh, rh)
- for i = 0,1,.1 do
- root.C0 = clerp(root, rootc0 * ca(math.pi/4,0,0), i , "ss")
- neck.C0 = clerp(neck, neckc0 * ca(-math.pi/4,0,0), i, "ss")
- lh.C0 = clerp(lh, lhc0 * ca(0,0,math.pi/4), i , "ss")
- rh.C0 = clerp(rh, rhc0 * ca(0,0,math.pi/4), i , "ss")
- rs.C0 = clerp(rs, rsc0 * ca(0,0,math.pi/2), i, "ss")
- ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,pi/4), i ,"ss")
- if i > .49 and i < .51 then
- Pellet.CFrame = (rootp.CFrame * CFrame.new(0,0,-10)) * CFrame.Angles(0,math.pi/2,math.pi/2)
- Pellet.Anchored = false
- Pellet.CanCollide = true
- local canHit = true
- Pellet.Touched:connect(function(hit)
- local hum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if hum and canHit then
- canHit = false
- hum:TakeDamage(15)
- end
- end)
- local Vel = Instance.new("BodyVelocity", Pellet)
- Vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- Vel.Velocity = rootp.CFrame.lookVector * 100
- game.Debris:AddItem(Pellet, 4)
- end
- wait(.03)
- end
- dweld(rh,lh,rs,ls)
- reset(.2)
- end)
- local tool3 = Instance.new("Tool", player.Backpack)
- tool3.Name = "Ice Wall"
- tool3.RequiresHandle = false
- tool3.Activated:connect(function()
- weld(rs,ls)
- human.WalkSpeed = 0
- for i = 0,1,.05 do
- rs.C0 = clerp(rs, rsc0 * ca(0,math.pi/6,math.pi/2), i, "ss")
- ls.C0 = clerp(ls, lsc0 * ca(0,-math.pi/6,-math.pi/2), i ,"ss")
- wait(.03)
- end
- local wall = Instance.new("Part", workspace)
- wall.Anchored = true
- wall.Size = Vector3.new(40,40,4)
- wall.Transparency = 1
- wall.BrickColor = BrickColor.new("Pastel blue-green")
- local Mesh = Instance.new("BlockMesh", wall)
- Mesh.Scale = Vector3.new(0,0,0)
- wall.Material = "Ice"
- wall.CFrame = char.Torso.CFrame * CFrame.new(0,17,-8)
- wall.TopSurface = "Smooth"
- wall.BottomSurface = "Smooth"
- game.Debris:AddItem(wall, 5)
- for i = 0,1,.1 do
- Mesh.Scale = Vector3.new(i, i, i)
- wall.Transparency = 1-i
- wait(.03)
- end
- human.WalkSpeed = 16
- Mesh.Scale = Vector3.new(1,1,1)
- wall.Transparency = 0
- wall.Touched:connect(function(hit)
- if hit.Parent:findFirstChild("Humanoid") and hit.Parent ~= char and hit.Anchored == false then
- --hit.Parent.Humanoid.WalkSpeed = 0
- hit.Parent.Humanoid:TakeDamage(15)
- for i,v in pairs(hit.Parent:GetChildren()) do
- if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
- v.Anchored = true
- spawn(function()
- wait(2)
- v.Anchored = false
- end)
- end
- end
- else
- hit.Velocity = Vector3.new(0,0,0)
- local doe = true
- for i,v in pairs(hit:GetChildren()) do
- if v:IsA("BodyVelocity") then
- doe = false
- v.Velocity = Vector3.new(0,0,0)
- v:Destroy()
- end
- end
- if doe == false then
- hit.Achored = true
- end
- end
- end)
- dweld(rs,ls)
- reset(.2)
- end)
Advertisement
Add Comment
Please, Sign In to add comment