Advertisement
memberhero

Untitled

Jul 28th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.11 KB | None | 0 0
  1. --[[
  2. Fire Mage
  3. Burn the resistors!
  4. --]]
  5.  
  6.  
  7. if script == nil then return end
  8.  
  9.  
  10. ModelName = "Fire Mage"
  11. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("memberhero")
  12. Selected = false
  13. Connected = false
  14. Button1Down = false
  15. CanUse = true
  16. Mana = 0
  17. ManaMax = 100
  18. MouseAim = game:GetService("InsertService"):LoadAsset(61527949)["MouseAim"].Value
  19.  
  20.  
  21. function CheckPlayer()
  22. if Player.Character == nil then return false end
  23. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Left Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  24. if Player.Character.Humanoid.Health <= 0 then return false end
  25. return true
  26. end
  27.  
  28.  
  29. loadstring(game:GetService("InsertService"):LoadAsset(65363615)["tagHumanoid"].Value)()
  30.  
  31.  
  32. loadstring(game:GetService("InsertService"):LoadAsset(63178291)["CameraPunch"].Value)()
  33.  
  34.  
  35. loadstring(game:GetService("InsertService"):LoadAsset(62991657)["PacketFunctions"].Value)()
  36.  
  37.  
  38. function SetAngle(Joint, Angle, Character)
  39. if Character == nil then return false end
  40. local Joints = {
  41. Character.Torso:FindFirstChild("Right Shoulder 2"),
  42. Character.Torso:FindFirstChild("Left Shoulder 2"),
  43. Character.Torso:FindFirstChild("Right Hip 2"),
  44. Character.Torso:FindFirstChild("Left Hip 2")
  45. }
  46. if Joints[Joint] == nil then return false end
  47. if Joint == 1 or Joint == 3 then
  48. Joints[Joint].DesiredAngle = Angle
  49. end
  50. if Joint == 2 or Joint == 4 then
  51. Joints[Joint].DesiredAngle = -Angle
  52. end
  53. end
  54.  
  55.  
  56. function ForceAngle(Joint, Angle, Character)
  57. if Character == nil then return false end
  58. local Joints = {
  59. Character.Torso:FindFirstChild("Right Shoulder 2"),
  60. Character.Torso:FindFirstChild("Left Shoulder 2"),
  61. Character.Torso:FindFirstChild("Right Hip 2"),
  62. Character.Torso:FindFirstChild("Left Hip 2")
  63. }
  64. if Joints[Joint] == nil then return false end
  65. if Joint == 1 or Joint == 3 then
  66. Joints[Joint].DesiredAngle = Angle
  67. Joints[Joint].CurrentAngle = Angle
  68. end
  69. if Joint == 2 or Joint == 4 then
  70. Joints[Joint].DesiredAngle = -Angle
  71. Joints[Joint].CurrentAngle = -Angle
  72. end
  73. end
  74.  
  75.  
  76. function SetSpeed(Joint, Speed, Character)
  77. if Character == nil then return false end
  78. local Joints = {
  79. Character.Torso:FindFirstChild("Right Shoulder 2"),
  80. Character.Torso:FindFirstChild("Left Shoulder 2"),
  81. Character.Torso:FindFirstChild("Right Hip 2"),
  82. Character.Torso:FindFirstChild("Left Hip 2")
  83. }
  84. if Joints[Joint] == nil then return false end
  85. Joints[Joint].MaxVelocity = Speed
  86. end
  87.  
  88.  
  89. function DisableLimb(Limb, Character)
  90. if Character == nil then return false end
  91. if Character:FindFirstChild("Torso") == nil then return false end
  92. local Joints = {
  93. Character.Torso:FindFirstChild("Right Shoulder"),
  94. Character.Torso:FindFirstChild("Left Shoulder"),
  95. Character.Torso:FindFirstChild("Right Hip"),
  96. Character.Torso:FindFirstChild("Left Hip")
  97. }
  98. local Limbs = {
  99. Character:FindFirstChild("Right Arm"),
  100. Character:FindFirstChild("Left Arm"),
  101. Character:FindFirstChild("Right Leg"),
  102. Character:FindFirstChild("Left Leg")
  103. }
  104. if Joints[Limb] == nil then return false end
  105. if Limbs[Limb] == nil then return false end
  106. local Joint = Instance.new("Motor6D")
  107. Joint.Parent = Character.Torso
  108. Joint.Part0 = Character.Torso
  109. Joint.Part1 = Limbs[Limb]
  110. if Limb == 1 then
  111. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  112. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  113. Joint.Name = "Right Shoulder 2"
  114. elseif Limb == 2 then
  115. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  116. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  117. Joint.Name = "Left Shoulder 2"
  118. elseif Limb == 3 then
  119. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  120. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  121. Joint.Name = "Right Hip 2"
  122. elseif Limb == 4 then
  123. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  124. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  125. Joint.Name = "Left Hip 2"
  126. end
  127. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  128. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  129. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  130. Joints[Limb]:Remove()
  131. end
  132.  
  133.  
  134. function ResetLimbCFrame(Limb, Character)
  135. if Character == nil then return false end
  136. if Character.Parent == nil then return false end
  137. if Character:FindFirstChild("Torso") == nil then return false end
  138. local Joints = {
  139. Character.Torso:FindFirstChild("Right Shoulder 2"),
  140. Character.Torso:FindFirstChild("Left Shoulder 2"),
  141. Character.Torso:FindFirstChild("Right Hip 2"),
  142. Character.Torso:FindFirstChild("Left Hip 2")
  143. }
  144. local Limbs = {
  145. Character:FindFirstChild("Right Arm"),
  146. Character:FindFirstChild("Left Arm"),
  147. Character:FindFirstChild("Right Leg"),
  148. Character:FindFirstChild("Left Leg")
  149. }
  150. if Joints[Limb] == nil then return false end
  151. if Limbs[Limb] == nil then return false end
  152. if Limb == 1 then
  153. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  154. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  155. elseif Limb == 2 then
  156. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  157. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  158. elseif Limb == 3 then
  159. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  160. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  161. elseif Limb == 4 then
  162. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  163. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  164. end
  165. end
  166.  
  167.  
  168. function EnableLimb(Limb, Character)
  169. if Character == nil then return false end
  170. if Character:FindFirstChild("Torso") == nil then return false end
  171. local Joints = {
  172. Character.Torso:FindFirstChild("Right Shoulder 2"),
  173. Character.Torso:FindFirstChild("Left Shoulder 2"),
  174. Character.Torso:FindFirstChild("Right Hip 2"),
  175. Character.Torso:FindFirstChild("Left Hip 2")
  176. }
  177. local Limbs = {
  178. Character:FindFirstChild("Right Arm"),
  179. Character:FindFirstChild("Left Arm"),
  180. Character:FindFirstChild("Right Leg"),
  181. Character:FindFirstChild("Left Leg")
  182. }
  183. if Joints[Limb] == nil then return false end
  184. if Limbs[Limb] == nil then return false end
  185. if Limb == 1 then
  186. Joints[Limb].Name = "Right Shoulder"
  187. elseif Limb == 2 then
  188. Joints[Limb].Name = "Left Shoulder"
  189. elseif Limb == 3 then
  190. Joints[Limb].Name = "Right Hip"
  191. elseif Limb == 4 then
  192. Joints[Limb].Name = "Left Hip"
  193. end
  194. Animate = Character:FindFirstChild("Animate")
  195. if Animate == nil then return false end
  196. Animate = Animate:Clone()
  197. Character.Animate:Remove()
  198. Animate.Parent = Character
  199. end
  200.  
  201.  
  202. function onButton1Down(Mouse)
  203. if Button1Down == true then return end
  204. Button1Down = true
  205. if CheckPlayer() == false then return end
  206. if CanUse == true then
  207. CanUse = false
  208. SetSpeed(1, 0.25, Player.Character)
  209. SetAngle(1, math.rad(90), Player.Character)
  210. SetSpeed(2, 0.25, Player.Character)
  211. SetAngle(2, math.rad(90), Player.Character)
  212. wait(0.3)
  213. local Arm = math.random(1, 2) == 1 and true or false
  214. local First = true
  215. while (Button1Down == true or First == true) and Selected == true and CheckPlayer() == true do
  216. if Mana <= 0 then break end
  217. First = false
  218. pcall(function()
  219. Arm = not Arm
  220. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209897", 1.5, 1, false, Player.Character.Torso)
  221. Mana = Mana - 2
  222. local Bullet = Instance.new("Part", Workspace)
  223. Bullet.Name = "Bullet"
  224. Bullet.TopSurface = 0
  225. Bullet.BottomSurface = 0
  226. Bullet.BrickColor = BrickColor.new("Really red")
  227. Bullet.Locked = true
  228. Bullet.FormFactor = "Custom"
  229. Bullet.Size = Vector3.new(0.5, 0.5, 1)
  230. Bullet.CFrame = CFrame.new((Player.Character[(Arm == true and "Right" or "Left").. " Arm"].CFrame * CFrame.new(0, -2.5, 0)).p, Mouse.Hit.p)
  231. Bullet.Elasticity = 0
  232. Bullet.Friction = 0
  233. Instance.new("SpecialMesh", Bullet).MeshType = "Sphere"
  234. tagHumanoid(Bullet)
  235. local BodyVelocity = Instance.new("BodyVelocity", Bullet)
  236. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  237. BodyVelocity.velocity = ((Mouse.Hit.p - Player.Character[(Arm == true and "Right" or "Left").. " Arm"].Position).unit * 150) + Vector3.new(math.random(-400, 400) / 1000, math.random(-400, 400) / 1000, math.random(-400, 400) / 1000)
  238. game:GetService("Debris"):AddItem(Bullet, 5)
  239. TouchedToServer([[local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  240. if Humanoid ~= nil then
  241. local creator = Source.creator:Clone()
  242. creator.Parent = Humanoid
  243. Humanoid:TakeDamage(15)
  244. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  245. else
  246. if Hit:GetMass() < 100 and Hit.Anchored == false then
  247. Hit:BreakJoints()
  248. Hit.Velocity = Source.Velocity / 2
  249. end
  250. end
  251. for i = 1, 5 do
  252. local Ember = Source:Clone()
  253. Ember.Parent = Workspace
  254. Ember.Size = Vector3.new(1, 1, 1)
  255. Ember.CFrame = Source.CFrame * CFrame.new(math.random(-500, 500) / 1000, math.random(-500, 500) / 1000, math.random(-500, 500) / 1000)
  256. Ember.Anchored = true
  257. Ember.CanCollide = false
  258. coroutine.wrap(function()
  259. for x = 0.1, 1, 0.1 do
  260. Ember.Mesh.Scale = Vector3.new(x, x, x)
  261. Ember.Transparency = x
  262. wait()
  263. end
  264. Ember:Remove()
  265. end)()
  266. end
  267. Source:Remove()]], Bullet)
  268. end)
  269. SetAngle(Arm == true and 1 or 2, math.rad(150), Player.Character)
  270. CameraPunch(math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000))
  271. wait(0.15)
  272. SetAngle(Arm == true and 1 or 2, math.rad(90), Player.Character)
  273. wait(0.05)
  274. end
  275. wait(0.1)
  276. SetAngle(1, 0, Player.Character)
  277. SetAngle(2, 0, Player.Character)
  278. wait(0.2)
  279. CanUse = true
  280. end
  281. end
  282.  
  283.  
  284. function onButton1Up(Mouse)
  285. Button1Down = false
  286. end
  287.  
  288.  
  289. function onKeyDown(Key, Mouse)
  290. if Selected == false then return end
  291. Key = Key:lower()
  292. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  293. if Key == "q" then
  294. if Mana < 25 then return end
  295. CanUse = false
  296. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2101137", 0.5, 1, false, Player.Character.Torso)
  297. Mana = Mana - 25
  298. SetSpeed(1, 0.1, Player.Character)
  299. SetAngle(1, math.rad(90), Player.Character)
  300. SetSpeed(2, 0.1, Player.Character)
  301. SetAngle(2, math.rad(90), Player.Character)
  302. local Boulder = Instance.new("Part", Player.Character)
  303. Boulder.Name = "Boulder"
  304. Boulder.Locked = true
  305. Boulder.TopSurface = 0
  306. Boulder.BottomSurface = 0
  307. Boulder.BrickColor = BrickColor.new("Pastel brown")
  308. Boulder.Material = "Concrete"
  309. Boulder.FormFactor = "Custom"
  310. Boulder.Size = Vector3.new(4, 4, 4)
  311. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  312. local Weld = Instance.new("Weld", Player.Character.Torso)
  313. Weld.Part0 = Weld.Parent
  314. Weld.Part1 = Boulder
  315. Weld.C0 = CFrame.new(0, 0, -4)
  316. for i = 0, 1, 0.02 do
  317. Boulder.Mesh.Scale = Vector3.new(i, i, i)
  318. local Pebble = Instance.new("Part", Player.Character)
  319. Pebble.Name = "Pebble"
  320. Pebble.TopSurface = 0
  321. Pebble.BottomSurface = 0
  322. Pebble.BrickColor = BrickColor.new("Pastel brown")
  323. Pebble.Material = "Concrete"
  324. Pebble.Locked = true
  325. Pebble.CanCollide = false
  326. Pebble.FormFactor = "Custom"
  327. Pebble.Size = Vector3.new(0.2 + (1 - i), 0.2 + (1 - i), 0.2 + (1 - i))
  328. Pebble.CFrame = Player.Character.Torso.CFrame * CFrame.new(math.random(-10000, 10000) / 1000, -5, -4 + math.random(-10000, 10000) / 1000)
  329. Instance.new("SpecialMesh", Pebble).MeshType = "Sphere"
  330. local BodyVelocity = Instance.new("BodyVelocity", Pebble)
  331. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  332. coroutine.wrap(function()
  333. while Pebble.Parent ~= nil and Boulder.Parent ~= nil do
  334. if pcall(function() if (Boulder.Position - Pebble.Position).magnitude < math.random(1, 2) then error() end end) == false then break end
  335. pcall(function() BodyVelocity.velocity = ((Boulder.Position - Pebble.Position).unit * 30) end)
  336. wait()
  337. end
  338. Pebble:Remove()
  339. end)()
  340. wait()
  341. end
  342. wait(0.5)
  343. if pcall(function() return Mouse.Hit end) == true then
  344. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 1, 1, false, Player.Character.Torso)
  345. Boulder:Remove()
  346. local Boulder = Boulder:Clone()
  347. Boulder.Transparency = 0
  348. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  349. local BodyVelocity = Instance.new("BodyVelocity", Boulder)
  350. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  351. BodyVelocity.velocity = ((Mouse.Hit.p - Player.Character.Torso.Position).unit * 100)
  352. game:GetService("Debris"):AddItem(Boulder, 5)
  353. Boulder.Parent = Workspace
  354. SetSpeed(1, 0.25, Player.Character)
  355. SetAngle(1, math.rad(120), Player.Character)
  356. SetSpeed(2, 0.25, Player.Character)
  357. SetAngle(2, math.rad(120), Player.Character)
  358. CameraPunch(math.rad(10), math.rad(math.random(-5000, 5000) / 1000))
  359. tagHumanoid(Boulder)
  360. wait(0.1)
  361. TouchedToServer([[if Hit:GetMass() < 1 then return end
  362. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  363. if Humanoid ~= nil then
  364. local creator = Source.creator:Clone()
  365. creator.Parent = Humanoid
  366. Humanoid:TakeDamage(100)
  367. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  368. else
  369. if Hit:GetMass() < 1000 and Hit.Anchored == false then
  370. Hit:BreakJoints()
  371. Hit.Velocity = Source.Velocity / 2
  372. end
  373. end
  374. for i = 1, math.random(20, 30) do
  375. local Chunk = Source:Clone()
  376. Chunk.Parent = Workspace
  377. Chunk.Size = Vector3.new(math.random(), math.random(), math.random())
  378. Chunk.CFrame = Source.CFrame * CFrame.new(math.random(-3000, 3000) / 1000, math.random(-3000, 3000) / 1000, math.random(-3000, 3000) / 1000)
  379. Chunk.Velocity = Source.Velocity + Vector3.new(math.random(-10000, 10000) / 1000, math.random(-10000, 10000) / 1000, math.random(-10000, 10000) / 1000)
  380. Instance.new("SpecialMesh", Chunk).MeshType = "Sphere"
  381. game:GetService("Debris"):AddItem(Chunk, math.random(4, 10))
  382. end
  383. Source:Remove()]], Boulder)
  384. wait(0.4)
  385. else
  386. Mana = Mana + 40
  387. SoundToServer("Decharge", "http://www.roblox.com/Asset/?id=35275769", 1, 1, false, Player.Character.Torso)
  388. Boulder.Material = "Plastic"
  389. for i = 0, 1, 0.01 do
  390. Boulder.Transparency = i
  391. Boulder.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i)
  392. wait()
  393. end
  394. Boulder:Remove()
  395. end
  396. SetSpeed(1, 0.15, Player.Character)
  397. SetAngle(1, 0, Player.Character)
  398. SetSpeed(2, 0.15, Player.Character)
  399. SetAngle(2, 0, Player.Character)
  400. wait(1)
  401. CanUse = true
  402. elseif Key == "e" then
  403. CanUse = false
  404. KeyEDown = true
  405. SetSpeed(1, 0.06, Player.Character)
  406. SetAngle(1, math.rad(40), Player.Character)
  407. SetSpeed(2, 0.06, Player.Character)
  408. SetAngle(2, math.rad(40), Player.Character)
  409. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2101144", 1.4, 1, false, Player.Character.Torso)
  410. for i = 0, 1, 0.09 do
  411. pcall(function()
  412. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180))
  413. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (40 * i)), 0)
  414. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (40 * i)), 0)
  415. end)
  416. wait()
  417. end
  418. pcall(function()
  419. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-50), 0, math.rad(180))
  420. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.3, 0.5, 0.2) * CFrame.fromEulerAnglesXYZ(0, math.rad(-50), 0)
  421. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.3, 0.5, 0.2) * CFrame.fromEulerAnglesXYZ(0, math.rad(50), 0)
  422. end)
  423. while KeyEDown == true and Selected == true and CheckPlayer() == true do
  424. local Pebble = Instance.new("Part", Player.Character)
  425. Pebble.Name = "Pebble"
  426. Pebble.TopSurface = 0
  427. Pebble.BottomSurface = 0
  428. Pebble.BrickColor = BrickColor.new("Pastel brown")
  429. Pebble.Material = "Concrete"
  430. Pebble.Locked = true
  431. Pebble.CanCollide = false
  432. Pebble.FormFactor = "Custom"
  433. Pebble.Size = Vector3.new(0.3, 0.3, 0.3)
  434. Pebble.CFrame = CFrame.new(Player.Character.Torso.Position + Vector3.new(math.random(-10000, 10000) / 1000, -8, math.random(-10000, 10000) / 1000))
  435. Instance.new("SpecialMesh", Pebble).MeshType = "Sphere"
  436. local BodyVelocity = Instance.new("BodyVelocity", Pebble)
  437. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  438. coroutine.wrap(function()
  439. local i = 0
  440. while true do
  441. i = i + 1
  442. if i > math.random(120, 350) or CheckPlayer() == false or KeyEDown == false then
  443. Pebble:Remove()
  444. return
  445. end
  446. if pcall(function() if (Player.Character.Torso.Position - Pebble.Position).magnitude < 1 then error() end end) == false then break end
  447. pcall(function() BodyVelocity.velocity = ((Player.Character.Torso.Position - Pebble.Position).unit * 10) end)
  448. wait()
  449. end
  450. if Mana < ManaMax then
  451. Mana = Mana + math.random(1, 3)
  452. else
  453. Mana = ManaMax
  454. pcall(function() Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + 2 end)
  455. end
  456. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=2974249", 3, 1, false, Player.Character.Torso)
  457. Pebble.Anchored = true
  458. Pebble.Material = "Plastic"
  459. local OldPosition = CFrame.new(Pebble.Position)
  460. local OldSize = Pebble.Size
  461. for i = 0, 1, 0.1 do
  462. Pebble.Transparency = i
  463. Pebble.Size = OldSize + (Vector3.new(5, 5, 5) * i)
  464. Pebble.CFrame = OldPosition
  465. wait()
  466. end
  467. Pebble:Remove()
  468. end)()
  469. wait(0.1)
  470. end
  471. KeyEDown = false
  472. SetAngle(1, 0, Player.Character)
  473. SetAngle(2, 0, Player.Character)
  474. for i = 1, 0, -0.03 do
  475. pcall(function()
  476. Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180))
  477. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (40 * i)), 0)
  478. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.2 * i), 0.5, 0.2 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (40 * i)), 0)
  479. end)
  480. wait()
  481. end
  482. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  483. ResetLimbCFrame(1, Player.Character)
  484. ResetLimbCFrame(2, Player.Character)
  485. CanUse = true
  486. elseif Key == "r" then
  487. if Mana < 20 then return end
  488. CanUse = false
  489. Mana = Mana - 5
  490. SetSpeed(1, 0.015, Player.Character)
  491. SetAngle(1, math.rad(-40), Player.Character)
  492. SetSpeed(2, 0.015, Player.Character)
  493. SetAngle(2, math.rad(-40), Player.Character)
  494. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 0.8, 1, false, Player.Character.Torso)
  495. for i = 0, 1, 0.03 do
  496. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  497. wait()
  498. end
  499. local Hit, Position = Workspace:FindPartOnRay(Ray.new((Player.Character.Torso.CFrame * CFrame.new(0, 0, -8)).p, Vector3.new(0, -1000, 0)), Player.Character)
  500. if Hit ~= nil and Position ~= nil then
  501. Mana = Mana - 15
  502. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 0.6, 1, false, Player.Character.Torso)
  503. local Pillar = Instance.new("Part", Workspace)
  504. Pillar.Name = "Pillar"
  505. Pillar.TopSurface = 0
  506. Pillar.BottomSurface = 0
  507. Pillar.BrickColor = BrickColor.new("Pastel brown")
  508. Pillar.Material = "Concrete"
  509. Pillar.Locked = true
  510. Pillar.Anchored = true
  511. Pillar.FormFactor = "Custom"
  512. Pillar.Size = Vector3.new(5, 50, 5)
  513. Pillar.CFrame = CFrame.new(Position, Vector3.new(Player.Character.Torso.Position.x, Position.y, Player.Character.Torso.Position.z)) * CFrame.new(math.random(-1000, 1000) / 1000, -35, (math.random(-1000, 1000) / 1000)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-2000, 2000) / 1000), math.rad(math.random(-2000, 2000) / 1000), math.rad(math.random(-2000, 2000) / 1000))
  514. tagHumanoid(Pillar)
  515. SendToServer([[local Connection = Pillar.Touched:connect(function(Hit)
  516. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  517. if Humanoid ~= nil then
  518. Humanoid.Sit = true
  519. Pillar.creator:Clone().Parent = Humanoid
  520. Humanoid:TakeDamage(3)
  521. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  522. pcall(function() Hit = Hit.Parent.Torso end)
  523. end
  524. if Hit:GetMass() < 5000 and Hit.Anchored == false then
  525. if Humanoid == nil then
  526. Hit:BreakJoints()
  527. end
  528. Hit.Velocity = ((Pillar.CFrame * CFrame.new(0, 25, 0)).p - (Pillar.CFrame * CFrame.new(0, -10, 0)).p).unit * 100
  529. end
  530. end)
  531. Pillar.CanCollide = false
  532. Pillar.Anchored = false
  533. local Position = Pillar.CFrame
  534. for i = 0, 1, 0.03 do
  535. Position = Position * CFrame.new(0, 2.75 * (1 - i), 0)
  536. Pillar.CFrame = Position
  537. Pillar.Velocity = Vector3.new()
  538. Pillar.RotVelocity = Vector3.new()
  539. wait()
  540. end
  541. Pillar.CanCollide = true
  542. Pillar.Anchored = true
  543. Pillar.CFrame = Position
  544. Pillar.Velocity = Vector3.new()
  545. Pillar.RotVelocity = Vector3.new()
  546. Connection:disconnect()
  547. wait(math.random(20, 30))
  548. for i = 1, 0, -0.05 do
  549. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  550. wait()
  551. end
  552. Pillar:Remove()]], "Pillar Damage", {"Pillar", Pillar})
  553. end
  554. SetSpeed(1, 0.275, Player.Character)
  555. SetAngle(1, math.rad(160), Player.Character)
  556. SetSpeed(2, 0.275, Player.Character)
  557. SetAngle(2, math.rad(160), Player.Character)
  558. for i = 0, 1, 0.075 do
  559. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  560. wait()
  561. end
  562. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  563. wait(0.5)
  564. SetSpeed(1, 0.25, Player.Character)
  565. SetAngle(1, 0, Player.Character)
  566. SetSpeed(2, 0.25, Player.Character)
  567. SetAngle(2, 0, Player.Character)
  568. for i = 0, 1, 0.1 do
  569. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  570. wait()
  571. end
  572. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  573. CanUse = true
  574. elseif Key == "t" then
  575. if Mana < 15 then return end
  576. CanUse = false
  577. SetSpeed(1, 0.03, Player.Character)
  578. SetAngle(1, math.rad(-40), Player.Character)
  579. SetSpeed(2, 0.03, Player.Character)
  580. SetAngle(2, math.rad(-40), Player.Character)
  581. for i = 0, 1, 0.06 do
  582. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  583. wait()
  584. end
  585. local Hit, Position = Workspace:FindPartOnRay(Ray.new(Player.Character.Torso.Position, Vector3.new(0, -4, 0)), Player.Character)
  586. if Hit ~= nil and Position ~= nil then
  587. Mana = Mana - 15
  588. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Player.Character.Torso)
  589. local Pillar = Instance.new("Part", Workspace)
  590. Pillar.Name = "Pillar"
  591. Pillar.TopSurface = 0
  592. Pillar.BottomSurface = 0
  593. Pillar.BrickColor = BrickColor.new("Pastel brown")
  594. Pillar.Material = "Concrete"
  595. Pillar.Locked = true
  596. Pillar.Anchored = true
  597. Pillar.FormFactor = "Custom"
  598. Pillar.Size = Vector3.new(2.5, 25, 2.5)
  599. Pillar.CFrame = CFrame.new(Position) * CFrame.new(0, -20, 0) * CFrame.fromEulerAnglesXYZ(Player.Character.Torso.CFrame:toEulerAnglesXYZ())
  600. SendToServer([[for i = 0, 1, 0.05 do
  601. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, 2.5 * (1 - i), 0)
  602. local Velocity = Torso.Velocity + Vector3.new(0, 20 * (1 - i), 0)
  603. for i = 1, 50 do
  604. Torso.Velocity = Velocity
  605. end
  606. wait()
  607. end
  608. wait(math.random(60, 120))
  609. for i = 1, 0, -0.1 do
  610. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  611. wait()
  612. end
  613. Pillar:Remove()]], "Pillar Jump", {"Pillar", Pillar, "Torso", Player.Character.Torso})
  614. end
  615. SetSpeed(1, 0.3, Player.Character)
  616. SetAngle(1, math.rad(160), Player.Character)
  617. SetSpeed(2, 0.3, Player.Character)
  618. SetAngle(2, math.rad(160), Player.Character)
  619. for i = 0, 1, 0.09 do
  620. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  621. wait()
  622. end
  623. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  624. wait(0.25)
  625. SetSpeed(1, 0.25, Player.Character)
  626. SetAngle(1, 0, Player.Character)
  627. SetSpeed(2, 0.25, Player.Character)
  628. SetAngle(2, 0, Player.Character)
  629. for i = 0, 1, 0.1 do
  630. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  631. wait()
  632. end
  633. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  634. CanUse = true
  635. elseif Key == "y" then
  636. if Mana < 50 then return end
  637. CanUse = false
  638. Mana = Mana - 50
  639. SetSpeed(1, 0.1, Player.Character)
  640. SetAngle(1, math.rad(220), Player.Character)
  641. SetSpeed(2, 0.1, Player.Character)
  642. SetAngle(2, math.rad(220), Player.Character)
  643. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 1, 1, false, Player.Character.Torso)
  644. for i = 0, 1, 0.025 do
  645. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + (40 * i)), 0, math.rad(180)) end)
  646. wait()
  647. end
  648. coroutine.wrap(function()
  649. local OldPosition = Player.Character.Torso.CFrame
  650. for i = 1, 50 do
  651. local Hit, Position = Workspace:FindPartOnRay(Ray.new((OldPosition * CFrame.new(0, 0, -8 - (i * 2))).p, Vector3.new(0, -50, 0)), Player.Character)
  652. if Hit ~= nil and Position ~= nil then
  653. local Pillar = Instance.new("Part", Workspace)
  654. Pillar.Name = "Pillar"
  655. Pillar.TopSurface = 0
  656. Pillar.BottomSurface = 0
  657. Pillar.BrickColor = BrickColor.new("Pastel brown")
  658. Pillar.Material = "Concrete"
  659. Pillar.Locked = true
  660. Pillar.Anchored = true
  661. Pillar.FormFactor = "Custom"
  662. Pillar.Size = Vector3.new(2, 5.5, 2)
  663. Pillar.CFrame = CFrame.new(Position) * CFrame.fromEulerAnglesXYZ(OldPosition:toEulerAnglesXYZ()) * CFrame.fromEulerAnglesXYZ(math.rad(-50), 0, 0) * CFrame.new(math.random(-500, 500) / 1000, -4, (math.random(-500, 500) / 1000)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000), math.rad(math.random(-1000, 1000) / 1000))
  664. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Pillar)
  665. tagHumanoid(Pillar)
  666. SendToServer([[local Connection = Pillar.Touched:connect(function(Hit)
  667. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  668. if Humanoid ~= nil then
  669. Humanoid.Sit = true
  670. Pillar.creator:Clone().Parent = Humanoid
  671. Humanoid:TakeDamage(5)
  672. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  673. pcall(function() Hit = Hit.Parent.Torso end)
  674. end
  675. if Hit:GetMass() < 30 and Hit.Anchored == false then
  676. if Humanoid == nil then
  677. Hit:BreakJoints()
  678. end
  679. Hit.Velocity = ((Pillar.CFrame * CFrame.new(0, 2.5, 0)).p - (Pillar.CFrame * CFrame.new(0, -2.5, 0)).p).unit * 50
  680. end
  681. end)
  682. Pillar.CanCollide = false
  683. Pillar.Anchored = false
  684. local Position = Pillar.CFrame
  685. for i = 0, 1, 0.1 do
  686. Position = Position * CFrame.new(0, 1 - i, 0)
  687. Pillar.CFrame = Position
  688. Pillar.Velocity = Vector3.new()
  689. Pillar.RotVelocity = Vector3.new()
  690. wait()
  691. end
  692. Pillar.CanCollide = true
  693. Pillar.Anchored = true
  694. Pillar.CFrame = Position
  695. Pillar.Velocity = Vector3.new()
  696. Pillar.RotVelocity = Vector3.new()
  697. Connection:disconnect()
  698. wait(3)
  699. for i = 1, 0, -0.05 do
  700. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -0.5 * (1 - i), 0)
  701. wait()
  702. end
  703. Pillar:Remove()]], "Pillar Damage", {"Pillar", Pillar})
  704. end
  705. wait()
  706. end
  707. end)()
  708. SetSpeed(1, 0.275, Player.Character)
  709. SetAngle(1, math.rad(-40), Player.Character)
  710. SetSpeed(2, 0.275, Player.Character)
  711. SetAngle(2, math.rad(-40), Player.Character)
  712. for i = 0, 1, 0.075 do
  713. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-50 - (100 * i)), 0, math.rad(180)) end)
  714. wait()
  715. end
  716. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-180), 0, math.rad(180)) end)
  717. wait(1)
  718. SetSpeed(1, 0.05, Player.Character)
  719. SetAngle(1, 0, Player.Character)
  720. SetSpeed(2, 0.05, Player.Character)
  721. SetAngle(2, 0, Player.Character)
  722. for i = 0, 1, 0.1 do
  723. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-180 + (90 * i)), 0, math.rad(180)) end)
  724. wait()
  725. end
  726. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  727. CanUse = true
  728. elseif Key == "u" then
  729. if Mana < 100 then return end
  730. CanUse = false
  731. Mana = Mana - 100
  732. SetSpeed(1, 0.005, Player.Character)
  733. SetAngle(1, math.rad(-40), Player.Character)
  734. SetSpeed(2, 0.005, Player.Character)
  735. SetAngle(2, math.rad(-40), Player.Character)
  736. SoundToServer("Charge", "http://www.roblox.com/Asset/?id=1369158", 0.5, 1, false, Player.Character.Torso)
  737. for i = 0, 1, 0.01 do
  738. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 - (40 * i)), 0, math.rad(180)) end)
  739. wait()
  740. end
  741. local Hit, Position = Workspace:FindPartOnRay(Ray.new((Player.Character.Torso.CFrame * CFrame.new(0, 0, -15)).p, Vector3.new(0, -10, 0)), Player.Character)
  742. if Hit ~= nil and Position ~= nil then
  743. local Wave = Instance.new("Part", Workspace)
  744. Wave.Name = "Wave"
  745. Wave.TopSurface = 0
  746. Wave.BottomSurface = 0
  747. Wave.BrickColor = BrickColor.new("Pastel brown")
  748. Wave.Material = "Concrete"
  749. Wave.Locked = true
  750. Wave.Anchored = true
  751. Wave.FormFactor = "Custom"
  752. Wave.Size = Vector3.new(50, 20, 20)
  753. Wave.CFrame = CFrame.new(Position) * CFrame.new(0, -10, 0) * CFrame.fromEulerAnglesXYZ(Player.Character.Torso.CFrame:toEulerAnglesXYZ())
  754. Instance.new("SpecialMesh", Wave).MeshType = "Sphere"
  755. tagHumanoid(Wave)
  756. SendToServer([[local Connection = Wave.Touched:connect(function(Hit)
  757. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  758. if Humanoid ~= nil then
  759. Humanoid.Sit = true
  760. Wave.creator:Clone().Parent = Humanoid
  761. Humanoid:TakeDamage(3)
  762. coroutine.wrap(function() wait(0.1) creator:Remove() end)()
  763. pcall(function() Hit = Hit.Parent.Torso end)
  764. end
  765. if Hit:GetMass() < 10000 and Hit.Anchored == false then
  766. if Humanoid == nil and math.random(1, 3) == 1 then
  767. Hit:BreakJoints()
  768. end
  769. Hit.Velocity = ((Wave.CFrame * CFrame.new(0, 0, -10)).p - (Wave.CFrame * CFrame.new(0, 0, 10)).p).unit * 80
  770. end
  771. end)
  772. Wave.CanCollide = false
  773. Wave.Anchored = false
  774. for i = 0, math.pi, 0.015 do
  775. _, Position = Workspace:FindPartOnRay(Ray.new((Wave.CFrame * CFrame.new(0, 11, -1)).p, Vector3.new(0, -22, 0)), Wave)
  776. if Position == nil then break end
  777. Wave.CFrame = CFrame.new(Position) * CFrame.new(0, -10 + (10 * math.sin(i)), 0) * CFrame.fromEulerAnglesXYZ(Wave.CFrame:toEulerAnglesXYZ())
  778. Wave.Velocity = Vector3.new()
  779. Wave.RotVelocity = Vector3.new()
  780. wait()
  781. end
  782. Wave:Remove()]], "Wave Damage", {"Wave", Wave})
  783. coroutine.wrap(function()
  784. while Wave.Parent ~= nil do
  785. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 0.5, 1, false, Wave)
  786. wait()
  787. end
  788. end)()
  789. end
  790. SetSpeed(1, 0.275, Player.Character)
  791. SetAngle(1, math.rad(160), Player.Character)
  792. SetSpeed(2, 0.275, Player.Character)
  793. SetAngle(2, math.rad(160), Player.Character)
  794. for i = 0, 1, 0.075 do
  795. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-130 + (90 * i)), 0, math.rad(180)) end)
  796. wait()
  797. end
  798. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40), 0, math.rad(180)) end)
  799. wait(0.5)
  800. SetSpeed(1, 0.25, Player.Character)
  801. SetAngle(1, 0, Player.Character)
  802. SetSpeed(2, 0.25, Player.Character)
  803. SetAngle(2, 0, Player.Character)
  804. for i = 0, 1, 0.1 do
  805. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-40 - (50 * i)), 0, math.rad(180)) end)
  806. wait()
  807. end
  808. pcall(function() Player.Character.Torso.Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180)) end)
  809. CanUse = true
  810. elseif Key == "p" then
  811. if Mana < 30 then return end
  812. CanUse = false
  813. Mana = Mana - 30
  814. SetSpeed(1, 0.06, Player.Character)
  815. SetAngle(1, math.rad(90), Player.Character)
  816. SetSpeed(2, 0.06, Player.Character)
  817. SetAngle(2, math.rad(90), Player.Character)
  818. for i = 0, 1, 0.03 do
  819. pcall(function()
  820. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  821. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  822. end)
  823. wait()
  824. end
  825. pcall(function()
  826. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0)
  827. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  828. end)
  829. local OldPosition = Player.Character.Torso.CFrame
  830. for i = math.rad(-90), math.rad(90), math.rad(12.5) do
  831. local Hit, Position = Workspace:FindPartOnRay(Ray.new(OldPosition.p, Vector3.new(0, -4, 0)), Player.Character)
  832. if Hit ~= nil and Position ~= nil then
  833. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=10209268", 2, 1, false, Player.Character.Torso)
  834. local Pillar = Instance.new("Part", Workspace)
  835. Pillar.Name = "Pillar"
  836. Pillar.TopSurface = 0
  837. Pillar.BottomSurface = 0
  838. Pillar.BrickColor = BrickColor.new("Pastel brown")
  839. Pillar.Material = "Concrete"
  840. Pillar.Locked = true
  841. Pillar.Anchored = true
  842. Pillar.FormFactor = "Custom"
  843. Pillar.Size = Vector3.new(2.5, 8, 2.5)
  844. Pillar.CFrame = CFrame.new(Position) * CFrame.new(0, -5.5, 0) * CFrame.fromEulerAnglesXYZ(OldPosition:toEulerAnglesXYZ()) * CFrame.fromEulerAnglesXYZ(0, i, 0) * CFrame.new(0, 0, -10)
  845. SendToServer([[for i = 0, 1, 0.1 do
  846. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, 1.7 * (1 - i), 0)
  847. wait()
  848. end
  849. wait(10)
  850. for i = 1, 0, -0.1 do
  851. Pillar.CFrame = Pillar.CFrame * CFrame.new(0, -5 * (1 - i), 0)
  852. wait()
  853. end
  854. Pillar:Remove()]], "Pillar Shield", {"Pillar", Pillar, "Torso", Player.Character.Torso})
  855. end
  856. wait(0.1)
  857. end
  858. SetSpeed(1, 0.06, Player.Character)
  859. SetAngle(1, 0, Player.Character)
  860. SetSpeed(2, 0.06, Player.Character)
  861. SetAngle(2, 0, Player.Character)
  862. for i = 1, 0, -0.03 do
  863. pcall(function()
  864. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
  865. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
  866. end)
  867. wait()
  868. end
  869. ResetLimbCFrame(1, Player.Character)
  870. ResetLimbCFrame(2, Player.Character)
  871. CanUse = true
  872. elseif Key == "f" then
  873. if Mana <= 0 then return end
  874. CanUse = false
  875. KeyFDown = true
  876. SetSpeed(1, 0.06, Player.Character)
  877. SetAngle(1, math.rad(60), Player.Character)
  878. SetSpeed(2, 0.06, Player.Character)
  879. SetAngle(2, math.rad(60), Player.Character)
  880. local Boulder = Instance.new("Part", Player.Character)
  881. Boulder.Name = "Boulder"
  882. Boulder.Locked = true
  883. Boulder.TopSurface = 0
  884. Boulder.BottomSurface = 0
  885. Boulder.BrickColor = BrickColor.new("Pastel brown")
  886. Boulder.Material = "Concrete"
  887. Boulder.FormFactor = "Custom"
  888. Boulder.Size = Vector3.new(4, 0.5, 7)
  889. Boulder.CFrame = Player.Character.Torso.CFrame * CFrame.new(0, -3, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  890. Instance.new("SpecialMesh", Boulder).MeshType = "Sphere"
  891. local Weld = Instance.new("Weld", Player.Character.Torso)
  892. Weld.Part0 = Weld.Parent
  893. Weld.Part1 = Boulder
  894. Weld.C0 = CFrame.new(0, -3, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  895. local AimGyroAdd = Instance.new("CFrameValue", Player.Character)
  896. AimGyroAdd.Name = "AimGyroAdd"
  897. pcall(function() Player.Character.Torso.Neck.MaxVelocity = 0 end)
  898. for i = 0, 1, 0.07 do
  899. pcall(function() Boulder.Mesh.Scale = Vector3.new(i, i, i) end)
  900. pcall(function()
  901. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (80 * i)), 0)
  902. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (80 * i)), 0)
  903. Player.Character.Torso.Neck.CurrentAngle = math.rad(90 * i)
  904. end)
  905. AimGyroAdd.Value = CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  906. wait()
  907. end
  908. pcall(function() Boulder.Mesh.Scale = Vector3.new(1, 1, 1) end)
  909. pcall(function()
  910. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10), 0)
  911. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(10), 0)
  912. end)
  913. local BodyVelocity = Instance.new("BodyVelocity", Boulder)
  914. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  915. local BodyGyro = Instance.new("BodyGyro", Boulder)
  916. BodyGyro.P = 1000
  917. BodyGyro.D = 500
  918. BodyGyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  919. local i = 0
  920. local OldTick = math.huge
  921. while KeyFDown == true and Selected == true and Mana > 0 do
  922. if tick() % 1 <= OldTick then
  923. Mana = Mana - 1
  924. end
  925. OldTick = tick() % 1
  926. pcall(function() Player.Character.Humanoid.PlatformStand = true end)
  927. if (Boulder.Position - Mouse.Hit.p).magnitude <= 10 then
  928. i = i - 0.15
  929. else
  930. i = i + 0.05
  931. end
  932. if i < 0 then
  933. i = 0
  934. elseif i > 1 then
  935. i = 1
  936. end
  937. BodyGyro.cframe = CFrame.new(Boulder.Position, Mouse.Hit.p)
  938. BodyVelocity.velocity = Boulder.CFrame.lookVector * 50 * i
  939. wait()
  940. end
  941. pcall(function() Player.Character.Humanoid.PlatformStand = false end)
  942. BodyVelocity:Remove()
  943. BodyGyro:Remove()
  944. SetSpeed(1, 0.06, Player.Character)
  945. SetAngle(1, 0, Player.Character)
  946. SetSpeed(2, 0.06, Player.Character)
  947. SetAngle(2, 0, Player.Character)
  948. for i = 1, 0, -0.07 do
  949. pcall(function() Boulder.Mesh.Scale = Vector3.new(i, i, i) end)
  950. pcall(function()
  951. Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 + (80 * i)), 0)
  952. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (80 * i)), 0)
  953. Player.Character.Torso.Neck.CurrentAngle = math.rad(90 * i)
  954. end)
  955. AimGyroAdd.Value = CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * i), 0)
  956. wait()
  957. end
  958. Boulder:Remove()
  959. pcall(function() Player.Character.Torso.Neck.CurrentAngle = 0 end)
  960. AimGyroAdd:Remove()
  961. ResetLimbCFrame(1, Player.Character)
  962. ResetLimbCFrame(2, Player.Character)
  963. CanUse = true
  964. end
  965. end
  966. end
  967.  
  968.  
  969. function onKeyUp(Key, Mouse)
  970. if Selected == false then return end
  971. Key = Key:lower()
  972. if Key == "e" then
  973. KeyEDown = false
  974. elseif Key == "f" then
  975. KeyFDown = false
  976. end
  977. end
  978.  
  979.  
  980. function onSelected(Mouse)
  981. if Selected == true or CanUse == false then return end
  982. CanUse = false
  983. while true do
  984. if CheckPlayer() == true then
  985. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil and Player.Character.Torso:FindFirstChild("Left Shoulder") ~= nil then
  986. break
  987. end
  988. end
  989. wait(0.1)
  990. end
  991. Selected = true
  992. DisableLimb(1, Player.Character)
  993. SetSpeed(1, 0.5, Player.Character)
  994. SetAngle(1, 0, Player.Character)
  995. DisableLimb(2, Player.Character)
  996. SetSpeed(2, 0.5, Player.Character)
  997. SetAngle(2, 0, Player.Character)
  998. coroutine.wrap(function()
  999. while Selected == true do
  1000. script.Parent.Name = "Mana:\n" ..Mana
  1001. wait()
  1002. end
  1003. script.Parent.Name = ModelName
  1004. end)()
  1005. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  1006. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  1007. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  1008. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  1009. Mouse.KeyUp:connect(function(Key) onKeyUp(Key, Mouse) end)
  1010. CanUse = true
  1011. end
  1012.  
  1013.  
  1014. function onDeselected(Mouse)
  1015. if Selected == false then return end
  1016. Selected = false
  1017. while CanUse == false do wait() end
  1018. ResetLimbCFrame(1, Player.Character)
  1019. ResetLimbCFrame(2, Player.Character)
  1020. SetSpeed(1, 0.25, Player.Character)
  1021. SetSpeed(2, 0.25, Player.Character)
  1022. EnableLimb(1, Player.Character)
  1023. EnableLimb(2, Player.Character)
  1024. CanUse = true
  1025. end
  1026.  
  1027.  
  1028. if script.Parent.ClassName ~= "HopperBin" then
  1029. if Player == nil then print("Error: Player not found!") return end
  1030. Tool = Instance.new("HopperBin")
  1031. Tool.Name = ModelName
  1032. Tool.Parent = Player.Backpack
  1033. Instance.new("IntValue", script).Name = "Magazine"
  1034. script.Name = "Main"
  1035. script.Parent = Tool
  1036. elseif script.Parent.ClassName == "HopperBin" and Connected == false then
  1037. Connected = true
  1038. Player = script.Parent.Parent.Parent
  1039. script.Parent.Selected:connect(onSelected)
  1040. script.Parent.Deselected:connect(onDeselected)
  1041. coroutine.wrap(loadstring(MouseAim))()
  1042. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement