clubstar54

Hie Hie

Jul 28th, 2016 (edited)
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.96 KB | None | 0 0
  1. local Player = script.Parent.Parent
  2.  
  3. repeat wait(.03) until Player.Character
  4. local char = Player.Character
  5. run = game:GetService("RunService")
  6. step = run.Heartbeat
  7. cn = CFrame.new
  8. ca = CFrame.Angles
  9. r = math.rad
  10. pi = math.pi
  11. player = game.Players:GetPlayerFromCharacter(char)
  12.  
  13. function Tween(easingFunction, duration, callback)
  14. local tick = tick
  15. local dur = 0
  16. local ratio = 0
  17. local start = tick()
  18. local wait = wait
  19. while (dur < duration) do
  20. local ratio = easingFunction(dur, 0, 1, duration)
  21. dur = (tick() - start)
  22. callback(ratio)
  23. wait()
  24. end
  25. callback(1)
  26. end
  27.  
  28. function TweenVector3(Part, Property, NewProperty, Duration, easingFunction)
  29. local orig = Part[Property]
  30. local dif = NewProperty - Part[Property]
  31.  
  32. local function callback(ratio)
  33. Part[Property] = orig + Vector3.new(
  34. dif.x * ratio,
  35. dif.y * ratio,
  36. dif.z * ratio
  37. )
  38. end
  39. Tween(easingFunction, Duration, callback)
  40. end
  41.  
  42. function TweenSize(Part, Property, NewProperty, Duration, easingFunction)
  43. local cf = Part.CFrame
  44. local orig = Part[Property]
  45. local dif = NewProperty - Part[Property]
  46.  
  47. local function callback(ratio)
  48. Part[Property] = orig + Vector3.new(
  49. dif.x * ratio,
  50. dif.y * ratio,
  51. dif.z * ratio
  52. )
  53. Part.CFrame = cf
  54. end
  55. Tween(easingFunction, Duration, callback)
  56. end
  57.  
  58. function TweenColor3(Part, Property, NewProperty, Duration, easingFunction)
  59. local orig = Part[Property]
  60. local dif = Color3.new(NewProperty.r - Part[Property].r, NewProperty.g - Part[Property].g, NewProperty.b - Part[Property].b)
  61. --print(dif)
  62. local function callback(ratio)
  63. --print(ratio)
  64. Part[Property] = BrickColor.new(
  65. orig.r + (dif.r*ratio),
  66. orig.g + (dif.g*ratio),
  67. orig.b + (dif.b*ratio)
  68. )
  69. end
  70. Tween(easingFunction, Duration, callback)
  71. end
  72.  
  73. x = 0.1
  74.  
  75. 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
  76. 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
  77.  
  78. function w(t)
  79. for Waiting = 1,t*33 do
  80. wait(.03)
  81. end
  82. end
  83.  
  84. function tabFind(tab, key)
  85. for i,v in pairs(tab) do
  86. if key == v then
  87. return i
  88. end
  89. end
  90. return nil
  91. end
  92.  
  93. function clerp(motor,c2,ie,style)
  94. if style == "l" or style == nil then
  95. return motor.C0:lerp(c2, ie)
  96. elseif style == "s" then
  97. return motor.C0:lerp(c2, math.sin(ie * pi * 0.5))
  98. elseif style == "c" then
  99. return motor.C0:lerp(c2, 1 - math.cos(ie * pi * 0.5))
  100. elseif style == "ss" then
  101. return motor.C0:lerp(c2, ie*ie*ie * (ie * (6*ie - 15) + 10))
  102. end
  103. end
  104. head = char:FindFirstChild("Head")
  105. tor = char:FindFirstChild("Torso")
  106. rootp = char:FindFirstChild("HumanoidRootPart")
  107. ra = char:FindFirstChild("Right Arm")
  108. la = char:FindFirstChild("Left Arm")
  109. rl = char:FindFirstChild("Right Leg")
  110. ll = char:FindFirstChild("Left Leg")
  111.  
  112. neck = tor:FindFirstChild("Neck")
  113. root = rootp:FindFirstChild("RootJoint") or rootp:findFirstChild("Root Hip")
  114. rs = tor:FindFirstChild("Right Shoulder")
  115. ls = tor:FindFirstChild("Left Shoulder")
  116. rh = tor:FindFirstChild("Right Hip")
  117. lh = tor:FindFirstChild("Left Hip")
  118.  
  119. human = char:FindFirstChild("Humanoid")
  120. if not char:FindFirstChild("use") then
  121. use = Instance.new("BoolValue",char)
  122. use.Name = "use"
  123. use.Value = false
  124. end
  125.  
  126. if char:FindFirstChild("use") then
  127. use = char.use
  128. end
  129.  
  130. if not fake then
  131. fake = Instance.new("Part")
  132. fake.Size = tor.Size
  133. fake.Parent = tor
  134. fake.Transparency = 1
  135. fakew = Instance.new("Weld",tor)
  136. fakew.Part0 = tor
  137. fakew.Part1 = fake
  138.  
  139. neckc0 = neck.C0
  140. rootc0 = root.C0
  141. rsc0 = rs.C0
  142. lsc0 = ls.C0
  143. rhc0 = rh.C0
  144. lhc0 = lh.C0
  145. end
  146.  
  147. function reset(x2)
  148. for i = 0,1, x2 do
  149. neck.C0 = clerp(neck, neckc0, i)
  150. root.C0 = clerp(root, rootc0, i)
  151. rs.C0 = clerp(rs, rsc0, i)
  152. ls.C0 = clerp(ls, lsc0, i)
  153. rh.C0 = clerp(rh, rhc0, i)
  154. lh.C0 = clerp(lh, lhc0, i)
  155. wait(.03)
  156. end
  157. end
  158.  
  159. function weld(l1,l2,l3,l4,l5)
  160. local tab = {l1,l2,l3,l4,l5}
  161. for _,v in pairs(tab) do
  162. v.Part0 = fake
  163. end
  164. end
  165.  
  166.  
  167. function dweld(l1,l2,l3,l4,l5)
  168. local tab = {l1,l2,l3,l4,l5}
  169. for _,v in pairs(tab) do
  170. v.Part0 = tor
  171. end
  172. end
  173.  
  174. for i,v in pairs(char:GetChildren()) do
  175. if v:IsA("Part") and v.Transparency == 0 then
  176. v.Touched:connect(function(hit)
  177. 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
  178. local ice = Instance.new("Part", v)
  179. ice.Name = "Ice"
  180. ice.Size = v.Size / 2
  181. ice.CanCollide = false
  182. ice.Position = Vector3.new(0,1000,0)
  183. ice.Anchored = false
  184. ice.Material = "Ice"
  185. ice.TopSurface = 1
  186. ice.BottomSurface = 1
  187. ice.LeftSurface = 1
  188. ice.RightSurface = 1
  189. ice.FrontSurface = 1
  190. ice.BackSurface = 1
  191. ice.Transparency = 1
  192. local Mesh = Instance.new("BlockMesh", ice)
  193. Mesh.Scale = Vector3.new(2.1,2.1,2.1)
  194. if v.Name == "Head" then
  195. Mesh:Destroy()
  196. local newMesh = Instance.new("SpecialMesh", ice)
  197. newMesh.MeshType = "Head"
  198. newMesh.Scale = Vector3.new(2.5,2.5,2.5)
  199. end
  200. spawn(function()
  201. for i = 1,.4,-.1 do
  202. ice.Transparency = i
  203. wait(.03)
  204. end
  205. end)
  206. ice.BrickColor = BrickColor.new("Pastel blue-green")
  207. local weld = Instance.new("Motor6D", ice)
  208. weld.Part0 = v
  209. weld.Part1 = ice
  210. game.Debris:AddItem(ice, 3)
  211. wait(2)
  212. spawn(function()
  213. for i = .4,1,.1 do
  214. ice.Transparency = i
  215. wait(.03)
  216. end
  217. ice:Destroy()
  218. end)
  219. end
  220. end)
  221. end
  222. end
  223.  
  224. local tool1 = Instance.new("Tool", player.Backpack)
  225. tool1.Name = "Ice Time"
  226. tool1.RequiresHandle = false
  227. tool1.Activated:connect(function()
  228. weld(rs,ls,rh,lh)
  229. human.WalkSpeed = 0
  230. for i = 0,1,.05 do
  231. rs.C0 = clerp(rs, rsc0 * ca(-math.pi/6,0,0), i, "ss")
  232. ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,0), i ,"ss")
  233. wait(.03)
  234. end
  235. local Ice = Instance.new("Part", workspace)
  236. Ice.Anchored = true
  237. Ice.Size = Vector3.new(1,.2,1)
  238. Ice.CFrame = rootp.CFrame * CFrame.new(0,-3,0)
  239. Ice.Transparency = 1
  240. Ice.CanCollide = false
  241. Ice.Material = "Ice"
  242. local Cylinder = Instance.new("CylinderMesh", Ice)
  243. Ice.BrickColor = BrickColor.new("Pastel blue-green")
  244. game.Debris:AddItem(Ice, 4)
  245. Ice.Touched:connect(function(hit)
  246. if hit.Parent:findFirstChild("Humanoid") and hit.Parent ~= char and hit.Anchored == false then
  247. --hit.Parent.Humanoid.WalkSpeed = 0
  248. --hit.Parent.Humanoid:TakeDamage(15)
  249. for i,v in pairs(hit.Parent:GetChildren()) do
  250. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  251. v.Anchored = true
  252. spawn(function()
  253. wait(4)
  254. v.Anchored = false
  255. end)
  256. end
  257. end
  258. end
  259. end)
  260. for i = 1,.2,-.05 do
  261. Ice.Size = Ice.Size + Vector3.new(2.5,0,2.5)
  262. Ice.CFrame = rootp.CFrame * CFrame.new(0,-3,0)
  263. Ice.Transparency = i
  264. wait(.03)
  265. end
  266. reset(.2)
  267. dweld(rs,ls,lh,rh)
  268. human.WalkSpeed = 16
  269. end)
  270.  
  271. local tool2 = Instance.new("Tool", player.Backpack)
  272. tool2.Name = "Ice Spike"
  273. tool2.RequiresHandle = false
  274. tool2.Activated:connect(function()
  275. weld(rs,ls)
  276. for i = 0,1,.1 do
  277. rs.C0 = clerp(rs, rsc0 * ca(0,0,math.pi), i, "ss")
  278. ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,pi/8), i ,"ss")
  279. wait(.03)
  280. end
  281. local Pellet = Instance.new("Part", workspace)
  282. local Mesh = Instance.new("SpecialMesh", Pellet)
  283. Mesh.MeshId = "http://www.roblox.com/Asset/?id=9756362"
  284. Pellet.Size = Vector3.new(2,2,2)
  285. Pellet.CFrame = rootp.CFrame * CFrame.new(1,5,0)
  286. Pellet.Anchored = true
  287. Pellet.CanCollide = false
  288. Pellet.BrickColor = BrickColor.new("Pastel blue-green")
  289. Pellet.Transparency = .2
  290. for i = 1,5 do
  291. Pellet.Size = Pellet.Size + Vector3.new(1,2,1)
  292. Pellet.CFrame = (rootp.CFrame * CFrame.new(1,5,0)) * CFrame.Angles(0,0,math.pi/2)
  293. Mesh.Scale = Pellet.Size
  294. wait(.03)
  295. end
  296. weld(lh, rh)
  297. for i = 0,1,.1 do
  298. root.C0 = clerp(root, rootc0 * ca(math.pi/4,0,0), i , "ss")
  299. neck.C0 = clerp(neck, neckc0 * ca(-math.pi/4,0,0), i, "ss")
  300. lh.C0 = clerp(lh, lhc0 * ca(0,0,math.pi/4), i , "ss")
  301. rh.C0 = clerp(rh, rhc0 * ca(0,0,math.pi/4), i , "ss")
  302. rs.C0 = clerp(rs, rsc0 * ca(0,0,math.pi/2), i, "ss")
  303. ls.C0 = clerp(ls, lsc0 * ca(-math.pi/6,0,pi/4), i ,"ss")
  304. if i > .49 and i < .51 then
  305. Pellet.CFrame = (rootp.CFrame * CFrame.new(0,0,-10)) * CFrame.Angles(0,math.pi/2,math.pi/2)
  306. Pellet.Anchored = false
  307. Pellet.CanCollide = true
  308. local canHit = true
  309. Pellet.Touched:connect(function(hit)
  310. local hum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
  311. if hum and canHit then
  312. canHit = false
  313. hum:TakeDamage(15)
  314. end
  315. end)
  316. local Vel = Instance.new("BodyVelocity", Pellet)
  317. Vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  318. Vel.Velocity = rootp.CFrame.lookVector * 100
  319. game.Debris:AddItem(Pellet, 4)
  320. end
  321. wait(.03)
  322. end
  323. dweld(rh,lh,rs,ls)
  324. reset(.2)
  325. end)
  326.  
  327. local tool3 = Instance.new("Tool", player.Backpack)
  328. tool3.Name = "Ice Wall"
  329. tool3.RequiresHandle = false
  330. tool3.Activated:connect(function()
  331. weld(rs,ls)
  332. human.WalkSpeed = 0
  333. for i = 0,1,.05 do
  334. rs.C0 = clerp(rs, rsc0 * ca(0,math.pi/6,math.pi/2), i, "ss")
  335. ls.C0 = clerp(ls, lsc0 * ca(0,-math.pi/6,-math.pi/2), i ,"ss")
  336. wait(.03)
  337. end
  338. local wall = Instance.new("Part", workspace)
  339. wall.Anchored = true
  340. wall.Size = Vector3.new(40,40,4)
  341. wall.Transparency = 1
  342. wall.BrickColor = BrickColor.new("Pastel blue-green")
  343. local Mesh = Instance.new("BlockMesh", wall)
  344. Mesh.Scale = Vector3.new(0,0,0)
  345. wall.Material = "Ice"
  346. wall.CFrame = char.Torso.CFrame * CFrame.new(0,17,-8)
  347. wall.TopSurface = "Smooth"
  348. wall.BottomSurface = "Smooth"
  349. game.Debris:AddItem(wall, 5)
  350. for i = 0,1,.1 do
  351. Mesh.Scale = Vector3.new(i, i, i)
  352. wall.Transparency = 1-i
  353. wait(.03)
  354. end
  355. human.WalkSpeed = 16
  356. Mesh.Scale = Vector3.new(1,1,1)
  357. wall.Transparency = 0
  358. wall.Touched:connect(function(hit)
  359. if hit.Parent:findFirstChild("Humanoid") and hit.Parent ~= char and hit.Anchored == false then
  360. --hit.Parent.Humanoid.WalkSpeed = 0
  361. hit.Parent.Humanoid:TakeDamage(15)
  362. for i,v in pairs(hit.Parent:GetChildren()) do
  363. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  364. v.Anchored = true
  365. spawn(function()
  366. wait(2)
  367. v.Anchored = false
  368. end)
  369. end
  370. end
  371. else
  372. hit.Velocity = Vector3.new(0,0,0)
  373. local doe = true
  374. for i,v in pairs(hit:GetChildren()) do
  375. if v:IsA("BodyVelocity") then
  376. doe = false
  377. v.Velocity = Vector3.new(0,0,0)
  378. v:Destroy()
  379. end
  380. end
  381. if doe == false then
  382. hit.Achored = true
  383. end
  384. end
  385. end)
  386. dweld(rs,ls)
  387. reset(.2)
  388. end)
Advertisement
Add Comment
Please, Sign In to add comment