Advertisement
DaLittleTem

Untitled

Jan 11th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 94.68 KB | None | 0 0
  1.  
  2. Player = game:GetService("Players"):FindFirstChild("adimihai")
  3. Name = "Wanda"
  4. selected = false
  5. Button1Down = false
  6. canFire = true
  7. spell = 0
  8. spellHotkey1 = 0
  9. spellHotkey2 = 0
  10. spellHotkey3 = 0
  11. spellHotkey1Delay = 0
  12. spellHotkey2Delay = 0
  13. spellHotkey3Delay = 0
  14. spellText = "None"
  15. power = 100
  16.  
  17.  
  18. spellGui = Instance.new("ScreenGui")
  19. spellGui.Name = Name
  20. local frame = Instance.new("Frame")
  21. frame.Name = "Frame"
  22. frame.Size = UDim2.new(0, 165, 0, 60)
  23. frame.Position = UDim2.new(0, 0, 1, -60)
  24. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  25. frame.BorderColor3 = Color3.new(0, 0, 0)
  26. frame.Parent = spellGui
  27. local label = Instance.new("TextLabel")
  28. label.Name = "Weapon"
  29. label.Text = "Weapon: " ..Name
  30. label.Size = UDim2.new(1, 0, 0, 20)
  31. label.Position = UDim2.new(0, 0, 0, 0)
  32. label.BackgroundColor3 = Color3.new(1, 0, 0)
  33. label.BorderColor3 = Color3.new(0, 0, 0)
  34. label.Parent = frame
  35. local label = Instance.new("TextLabel")
  36. label.Name = "SpellPrefix"
  37. label.Text = " Spell:"
  38. label.TextXAlignment = "Left"
  39. label.Size = UDim2.new(1, 0, 0, 20)
  40. label.Position = UDim2.new(0, 0, 0, 20)
  41. label.BackgroundColor3 = Color3.new(1, 1, 1)
  42. label.BorderColor3 = Color3.new(0, 0, 0)
  43. label.Parent = frame
  44. local label = Instance.new("TextLabel")
  45. label.Name = "Spell"
  46. label.Text = "None"
  47. label.TextXAlignment = "Right"
  48. label.Size = UDim2.new(1, 0, 0, 20)
  49. label.Position = UDim2.new(0, -10, 0, 20)
  50. label.BackgroundTransparency = 1
  51. label.BorderSizePixel = 0
  52. label.Parent = frame
  53. local label = Instance.new("TextLabel")
  54. label.Name = "PowerPrefix"
  55. label.Text = " Power:"
  56. label.TextXAlignment = "Left"
  57. label.Size = UDim2.new(1, 0, 0, 20)
  58. label.Position = UDim2.new(0, 0, 0, 40)
  59. label.BackgroundColor3 = Color3.new(1, 1, 1)
  60. label.BorderColor3 = Color3.new(0, 0, 0)
  61. label.Parent = frame
  62. local label = Instance.new("TextLabel")
  63. label.Name = "Power"
  64. label.Text = "100"
  65. label.TextXAlignment = "Right"
  66. label.Size = UDim2.new(1, 0, 0, 20)
  67. label.Position = UDim2.new(0, -10, 0, 40)
  68. label.BackgroundTransparency = 1
  69. label.BorderSizePixel = 0
  70. label.Parent = frame
  71.  
  72.  
  73. function updateGui(format)
  74. if selected == false then return end
  75. if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
  76. if Player.PlayerGui:FindFirstChild(Name) == nil then
  77. spellGui:Clone().Parent = Player.PlayerGui
  78. end
  79. Player.PlayerGui[Name].Frame.Spell.Text = spellText
  80. if power <= 0 then
  81. Player.PlayerGui[Name].Frame.Power.Text = "OVERHEAT (" ..math.abs(power).. ")"
  82. else
  83. Player.PlayerGui[Name].Frame.Power.Text = power
  84. end
  85. end
  86.  
  87.  
  88. function updateSpellText()
  89. if spell == 1 then
  90. spellText = "Arefu Slash (1P)"
  91. elseif spell == 2 then
  92. spellText = "Arefu Metoria (50P)"
  93. elseif spell == 3 then
  94. spellText = "Eccrando Bolt (25P)"
  95. elseif spell == 4 then
  96. spellText = "Eccrando Strike (~60P)"
  97. elseif spell == 5 then
  98. spellText = "Thius Dae (1P/2ms)"
  99. elseif spell == 6 then
  100. spellText = "Thius Heed (1P/2ms)"
  101. elseif spell == 7 then
  102. spellText = "Combuscus Phore (75P)"
  103. elseif spell == 8 then
  104. spellText = "Combuscus Burn (10P)"
  105. elseif spell == 9 then
  106. spellText = "Combuscus Vortex (50P)"
  107. elseif spell == 10 then
  108. spellText = "C. Phore Nexus (100P)"
  109. elseif spell == 11 then
  110. spellText = "Kanamla Cysis (2P/1sec)"
  111. elseif spell == 12 then
  112. spellText = "Kanamla Tepidift (50P)"
  113. elseif spell == 13 then
  114. spellText = "Kanamla Jump (5P)"
  115. elseif spell == 14 then
  116. spellText = "Candora Hide (2P/1sec)"
  117. elseif spell == 15 then
  118. spellText = "Duraen Control (1P/?ms)"
  119. elseif spell == 16 then
  120. spellText = "Duraen Switch (?P)"
  121. else
  122. spellText = "None"
  123. end
  124. end
  125.  
  126.  
  127. function makeParts(format)
  128. local model = Instance.new("Model")
  129. model.Name = Name
  130. model.Parent = Player.Character
  131. local pm = Instance.new("Part")
  132. pm.Name = "Handle"
  133. pm.FormFactor = "Custom"
  134. pm.Size = Vector3.new(1, 1, 1)
  135. pm.BrickColor = BrickColor.new("Reddish brown")
  136. pm.Locked = true
  137. pm.TopSurface = 0
  138. pm.BottomSurface = 0
  139. pm.Parent = model
  140. local m = Instance.new("SpecialMesh")
  141. m.MeshType = "Head"
  142. m.Scale = Vector3.new(0.3, 2, 0.3)
  143. m.Parent = pm
  144. if format ~= nil then
  145. local w = Instance.new("Weld")
  146. w.Part0 = pm
  147. if format == "hand" then
  148. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  149. w.C0 = CFrame.new(0, -0.75, 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  150. w.C1 = CFrame.new()
  151. w.Parent = pm
  152. elseif format == "holster" then
  153. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  154. w.C0 = CFrame.new(0, 0.1, -0.55) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  155. w.C1 = CFrame.new()
  156. w.Parent = pm
  157. model.Name = Name.. " (Holstered)"
  158. else
  159. print("Error: Incorrect format string!")
  160. end
  161. end
  162. local s = Instance.new("Sound")
  163. s.Name = "Shine"
  164. s.SoundId = "http://www.roblox.com/Asset/?id=2101144"
  165. s.Volume = 1
  166. s.Pitch = 1
  167. s.Looped = false
  168. s.Parent = pm
  169. local s = Instance.new("Sound")
  170. s.Name = "Bolt"
  171. s.SoundId = "http://www.roblox.com/Asset/?id=2974000"
  172. s.Volume = 1
  173. s.Pitch = 1
  174. s.Looped = false
  175. s.Parent = pm
  176. local s = Instance.new("Sound")
  177. s.Name = "Impact1"
  178. s.SoundId = "http://www.roblox.com/Asset/?id=10209596"
  179. s.Volume = 1
  180. s.Pitch = 1
  181. s.Looped = false
  182. s.Parent = pm
  183. local s = Instance.new("Sound")
  184. s.Name = "Charge1"
  185. s.SoundId = "http://www.roblox.com/Asset/?id=1369158"
  186. s.Volume = 1
  187. s.Pitch = 1
  188. s.Looped = false
  189. s.Parent = pm
  190. local s = Instance.new("Sound")
  191. s.Name = "Charge2"
  192. s.SoundId = "http://www.roblox.com/Asset/?id=2101137"
  193. s.Volume = 1
  194. s.Pitch = 1
  195. s.Looped = false
  196. s.Parent = pm
  197. local s = Instance.new("Sound")
  198. s.Name = "Charge3"
  199. s.SoundId = "http://www.roblox.com/Asset/?id=2785493"
  200. s.Volume = 1
  201. s.Pitch = 1
  202. s.Looped = false
  203. s.Parent = pm
  204. local s = Instance.new("Sound")
  205. s.Name = "Charge4"
  206. s.SoundId = "http://www.roblox.com/Asset/?id=35275769"
  207. s.Volume = 1
  208. s.Pitch = 1
  209. s.Looped = false
  210. s.Parent = pm
  211. local s = Instance.new("Sound")
  212. s.Name = "Fire1"
  213. s.SoundId = "http://www.roblox.com/Asset/?id=10209268"
  214. s.Volume = 1
  215. s.Pitch = 1
  216. s.Looped = false
  217. s.Parent = pm
  218. local s = Instance.new("Sound")
  219. s.Name = "Fire2"
  220. s.SoundId = "http://www.roblox.com/Asset/?id=13775466"
  221. s.Volume = 1
  222. s.Pitch = 1
  223. s.Looped = false
  224. s.Parent = pm
  225. local s = Instance.new("Sound")
  226. s.Name = "Fire3"
  227. s.SoundId = "http://www.roblox.com/Asset/?id=2767090"
  228. s.Volume = 1
  229. s.Pitch = 1
  230. s.Looped = false
  231. s.Parent = pm
  232. local s = Instance.new("Sound")
  233. s.Name = "Fire4"
  234. s.SoundId = "http://www.roblox.com/Asset/?id=2800815"
  235. s.Volume = 1
  236. s.Pitch = 1
  237. s.Looped = false
  238. s.Parent = pm
  239. local s = Instance.new("Sound")
  240. s.Name = "Fire5"
  241. s.SoundId = "http://www.roblox.com/Asset/?id=2974249"
  242. s.Volume = 1
  243. s.Pitch = 1
  244. s.Looped = false
  245. s.Parent = pm
  246. local p = Instance.new("Part")
  247. p.Name = "Source"
  248. p.FormFactor = "Custom"
  249. p.Size = Vector3.new(1, 1, 1)
  250. p.Transparency = 1
  251. p.BrickColor = BrickColor.new("Really black")
  252. p.CanCollide = false
  253. p.Locked = true
  254. p.TopSurface = 0
  255. p.BottomSurface = 0
  256. p.Parent = model
  257. local m = Instance.new("SpecialMesh")
  258. m.MeshType = "Sphere"
  259. m.Scale = Vector3.new(1, 1, 1)
  260. m.Parent = p
  261. local w = Instance.new("Weld")
  262. w.Part0 = p
  263. w.Part1 = pm
  264. w.C0 = CFrame.new()
  265. w.C1 = CFrame.new(0, 1, 0)
  266. w.Parent = p
  267. local f = Instance.new("Fire")
  268. f.Enabled = false
  269. f.Name = "Fire"
  270. f.Heat = 0
  271. f.Size = 1
  272. f.Parent = p
  273. for i, p in pairs(model.Handle:GetChildren()) do if p.ClassName == "Sound" then p:Play() m = Instance.new("Message") m.Parent = model m.Text = p.Name wait(2) m:Remove() end end
  274. end
  275.  
  276.  
  277. function removeParts(format)
  278. if format == "hand" then
  279. if Player.Character:FindFirstChild(Name) ~= nil then
  280. Player.Character[Name]:Remove()
  281. end
  282. elseif format == "holster" then
  283. if Player.Character:FindFirstChild(Name.. " (Holstered)") ~= nil then
  284. Player.Character[Name.. " (Holstered)"]:Remove()
  285. end
  286. end
  287. end
  288.  
  289.  
  290. function SetAngle(Joint, Angle, Character)
  291. if Character == nil then return false end
  292. local Joints = {
  293. Character.Torso:FindFirstChild("Right Shoulder 2"),
  294. Character.Torso:FindFirstChild("Left Shoulder 2"),
  295. Character.Torso:FindFirstChild("Right Hip 2"),
  296. Character.Torso:FindFirstChild("Left Hip 2")
  297. }
  298. if Joints[Joint] == nil then return false end
  299. if Joint == 1 or Joint == 3 then
  300. Joints[Joint].DesiredAngle = Angle
  301. end
  302. if Joint == 2 or Joint == 4 then
  303. Joints[Joint].DesiredAngle = -Angle
  304. end
  305. end
  306.  
  307.  
  308. function ForceAngle(Joint, Angle, Character)
  309. if Character == nil then return false end
  310. local Joints = {
  311. Character.Torso:FindFirstChild("Right Shoulder 2"),
  312. Character.Torso:FindFirstChild("Left Shoulder 2"),
  313. Character.Torso:FindFirstChild("Right Hip 2"),
  314. Character.Torso:FindFirstChild("Left Hip 2")
  315. }
  316. if Joints[Joint] == nil then return false end
  317. if Joint == 1 or Joint == 3 then
  318. Joints[Joint].DesiredAngle = Angle
  319. Joints[Joint].CurrentAngle = Angle
  320. end
  321. if Joint == 2 or Joint == 4 then
  322. Joints[Joint].DesiredAngle = -Angle
  323. Joints[Joint].CurrentAngle = -Angle
  324. end
  325. end
  326.  
  327.  
  328. function SetSpeed(Joint, Speed, Character)
  329. if Character == nil then return false end
  330. local Joints = {
  331. Character.Torso:FindFirstChild("Right Shoulder 2"),
  332. Character.Torso:FindFirstChild("Left Shoulder 2"),
  333. Character.Torso:FindFirstChild("Right Hip 2"),
  334. Character.Torso:FindFirstChild("Left Hip 2")
  335. }
  336. if Joints[Joint] == nil then return false end
  337. Joints[Joint].MaxVelocity = Speed
  338. end
  339.  
  340.  
  341. function DisableLimb(Limb, Character)
  342. if Character == nil then return false end
  343. if Character:FindFirstChild("Torso") == nil then return false end
  344. local Joints = {
  345. Character.Torso:FindFirstChild("Right Shoulder"),
  346. Character.Torso:FindFirstChild("Left Shoulder"),
  347. Character.Torso:FindFirstChild("Right Hip"),
  348. Character.Torso:FindFirstChild("Left Hip")
  349. }
  350. local Limbs = {
  351. Character:FindFirstChild("Right Arm"),
  352. Character:FindFirstChild("Left Arm"),
  353. Character:FindFirstChild("Right Leg"),
  354. Character:FindFirstChild("Left Leg")
  355. }
  356. if Joints[Limb] == nil then return false end
  357. if Limbs[Limb] == nil then return false end
  358. local Joint = Instance.new("Motor")
  359. Joint.Parent = Character.Torso
  360. Joint.Part0 = Character.Torso
  361. Joint.Part1 = Limbs[Limb]
  362. if Limb == 1 then
  363. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  364. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  365. Joint.Name = "Right Shoulder 2"
  366. elseif Limb == 2 then
  367. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  368. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  369. Joint.Name = "Left Shoulder 2"
  370. elseif Limb == 3 then
  371. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  372. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  373. Joint.Name = "Right Hip 2"
  374. elseif Limb == 4 then
  375. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  376. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  377. Joint.Name = "Left Hip 2"
  378. end
  379. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  380. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  381. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  382. Joints[Limb]:Remove()
  383. end
  384.  
  385.  
  386. function ResetLimbCFrame(Limb, Character)
  387. if Character == nil then return false end
  388. if Character.Parent == nil then return false end
  389. if Character:FindFirstChild("Torso") == nil then return false end
  390. local Joints = {
  391. Character.Torso:FindFirstChild("Right Shoulder 2"),
  392. Character.Torso:FindFirstChild("Left Shoulder 2"),
  393. Character.Torso:FindFirstChild("Right Hip 2"),
  394. Character.Torso:FindFirstChild("Left Hip 2")
  395. }
  396. local Limbs = {
  397. Character:FindFirstChild("Right Arm"),
  398. Character:FindFirstChild("Left Arm"),
  399. Character:FindFirstChild("Right Leg"),
  400. Character:FindFirstChild("Left Leg")
  401. }
  402. if Joints[Limb] == nil then return false end
  403. if Limbs[Limb] == nil then return false end
  404. if Limb == 1 then
  405. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  406. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  407. elseif Limb == 2 then
  408. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  409. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  410. elseif Limb == 3 then
  411. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  412. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  413. elseif Limb == 4 then
  414. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  415. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  416. end
  417. end
  418.  
  419.  
  420. function EnableLimb(Limb, Character)
  421. if Character == nil then return false end
  422. if Character:FindFirstChild("Torso") == nil then return false end
  423. local Joints = {
  424. Character.Torso:FindFirstChild("Right Shoulder 2"),
  425. Character.Torso:FindFirstChild("Left Shoulder 2"),
  426. Character.Torso:FindFirstChild("Right Hip 2"),
  427. Character.Torso:FindFirstChild("Left Hip 2")
  428. }
  429. local Limbs = {
  430. Character:FindFirstChild("Right Arm"),
  431. Character:FindFirstChild("Left Arm"),
  432. Character:FindFirstChild("Right Leg"),
  433. Character:FindFirstChild("Left Leg")
  434. }
  435. if Joints[Limb] == nil then return false end
  436. if Limbs[Limb] == nil then return false end
  437. if Limb == 1 then
  438. Joints[Limb].Name = "Right Shoulder"
  439. elseif Limb == 2 then
  440. Joints[Limb].Name = "Left Shoulder"
  441. elseif Limb == 3 then
  442. Joints[Limb].Name = "Right Hip"
  443. elseif Limb == 4 then
  444. Joints[Limb].Name = "Left Hip"
  445. end
  446. Animate = Character:FindFirstChild("Animate")
  447. if Animate == nil then return false end
  448. Animate = Animate:Clone()
  449. Character.Animate:Remove()
  450. Animate.Parent = Character
  451. end
  452.  
  453.  
  454. function Weld(x, y)
  455. local weld = Instance.new("Weld")
  456. weld.Part0 = x
  457. weld.Part1 = y
  458. CJ = CFrame.new(x.Position)
  459. C0 = x.CFrame:inverse() * CJ
  460. C1 = y.CFrame:inverse() * CJ
  461. weld.C0 = C0
  462. weld.C1 = C1
  463. weld.Parent = x
  464. end
  465.  
  466.  
  467. function tagHumanoid(humanoid)
  468. local tag = Instance.new("ObjectValue")
  469. tag.Name = "creator"
  470. tag.Value = Player
  471. tag.Parent = humanoid
  472. local tag = Instance.new("StringValue")
  473. tag.Name = "creatorType1"
  474. tag.Value = Name
  475. tag.Parent = humanoid
  476. local tag = Instance.new("StringValue")
  477. tag.Name = "creatorType2"
  478. tag.Value = "killed with magic"
  479. tag.Parent = humanoid
  480. end
  481.  
  482.  
  483. function untagHumanoid(humanoid)
  484. if humanoid ~= nil then
  485. local tag = humanoid:FindFirstChild("creator")
  486. if tag ~= nil then
  487. tag:Remove()
  488. end
  489. local tag = humanoid:FindFirstChild("creatorType1")
  490. if tag ~= nil then
  491. tag:Remove()
  492. end
  493. local tag = humanoid:FindFirstChild("creatorType2")
  494. if tag ~= nil then
  495. tag:Remove()
  496. end
  497. end
  498. end
  499.  
  500.  
  501. function onButton1Down(mouse)
  502. if selected == false or canFire == false or power <= 0 then return end
  503. if Player.Character == nil then return end
  504. if Player.Character:FindFirstChild("Humanoid") == nil then return end
  505. if Player.Character.Humanoid.Health <= 0 then return end
  506. if Player.Character:FindFirstChild(Name) == nil then return end
  507. if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
  508. if Player.Character[Name]:FindFirstChild("Source") == nil then return end
  509. if mouse == nil then return end
  510. Button1Down = true
  511. if spell == 1 then
  512. --Arefu Slash, projectile class. Uses hardened air particles to create razor-sharp projectiles.
  513. canFire = false
  514. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  515. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  516. Player.Character[Name].Source.Transparency = 0.25
  517. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
  518. Player.Character[Name].Source.Fire.Enabled = true
  519. Player.Character[Name].Source.Fire.Heat = math.random(5, 10)
  520. Player.Character[Name].Source.Fire.Size = math.random(5, 10)
  521. Player.Character[Name].Source.Fire.Color = Color3.new(0, 1, 0)
  522. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  523. while Button1Down == true do
  524. if power <= 0 then break end
  525. coroutine.resume(coroutine.create(function()
  526. for i = 0, 1, 0.1 do
  527. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
  528. Player.Character[Name].Source.Transparency = i
  529. wait()
  530. end
  531. Player.Character[Name].Source.Transparency = 1
  532. Player.Character[Name].Source.Fire.Enabled = false
  533. end))
  534. Player.Character[Name].Handle.Fire2.Looped = false
  535. Player.Character[Name].Handle.Fire2.Volume = 1
  536. Player.Character[Name].Handle.Fire2.Pitch = 1
  537. Player.Character[Name].Handle.Fire2:Play()
  538. power = power - 1
  539. local air = Instance.new("Part")
  540. air.Name = "Air"
  541. air.FormFactor = "Custom"
  542. air.Size = Vector3.new(1, 1, 2)
  543. air.TopSurface = "Smooth"
  544. air.BottomSurface = "Smooth"
  545. air.BrickColor = BrickColor.new("Institutional white")
  546. air.CanCollide = false
  547. air.Anchored = true
  548. air.Transparency = math.random(0, 5) / 10
  549. air.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100)), mouse.Hit.p)
  550. air.Parent = Workspace
  551. air:BreakJoints()
  552. local m = Instance.new("SpecialMesh")
  553. m.MeshType = "Sphere"
  554. m.Scale = Vector3.new(0.5, 0.5, 1)
  555. m.Parent = air
  556. coroutine.resume(coroutine.create(function()
  557. while air.Parent ~= nil do
  558. air.CFrame = CFrame.new(air.Position + (air.CFrame.lookVector * 5)) * CFrame.fromEulerAnglesXYZ(air.CFrame:toEulerAnglesXYZ())
  559. for _, model in pairs(Workspace:GetChildren()) do
  560. if model.ClassName == "Part" then
  561. if (air.Position - model.Position).magnitude <= 5 and model.Anchored == false then
  562. model.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  563. if math.random(1, 10) == 1 then model:BreakJoints() end
  564. air:Remove()
  565. return
  566. end
  567. elseif model.ClassName == "Model" and model ~= Player.Character then
  568. for _, x in pairs(model:GetChildren()) do
  569. if x.ClassName == "Part" then
  570. if (air.Position - x.Position).magnitude <= 5 and x.Anchored == false then
  571. x.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  572. if math.random(1, 10) == 1 then x:BreakJoints() end
  573. if model:FindFirstChild("Humanoid") ~= nil then
  574. model.Humanoid:TakeDamage(5)
  575. model.Humanoid.Sit = true
  576. end
  577. air:Remove()
  578. return
  579. end
  580. end
  581. end
  582. end
  583. end
  584. local shock = Instance.new("Part")
  585. shock.FormFactor = "Custom"
  586. shock.Size = Vector3.new(1, 1, 1)
  587. shock.BrickColor = BrickColor.new("Institutional white")
  588. shock.Anchored = true
  589. shock.Name = "Shock Ring"
  590. shock.CanCollide = false
  591. shock.Parent = Workspace
  592. local mesh = Instance.new("SpecialMesh")
  593. mesh.MeshType = "FileMesh"
  594. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  595. mesh.Scale = Vector3.new(1, 1, 1)
  596. mesh.Parent = shock
  597. shock.CFrame = CFrame.new(air.Position + (air.CFrame.lookVector * 10), air.Position + (air.CFrame.lookVector * 50)) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  598. coroutine.resume(coroutine.create(function()
  599. for i = 0, 10 do
  600. shock.Mesh.Scale = Vector3.new(i / 5, i, i / 5)
  601. shock.Transparency = i / 10
  602. wait()
  603. end
  604. shock:Remove()
  605. end))
  606. wait()
  607. end
  608. end))
  609. coroutine.resume(coroutine.create(function(part)
  610. wait(10)
  611. part:Remove()
  612. end), air)
  613. wait()
  614. end
  615. canFire = true
  616. elseif spell == 2 then
  617. --Arefu Metoria, projectile class. Uses meteors.
  618. local position, target = mouse.Hit.p, mouse.Target
  619. if target == nil then return end
  620. if target.Parent == nil then return end
  621. canFire = false
  622. power = power - 50
  623. local offset = position - target.Position
  624. local size = math.random(10, 30)
  625. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  626. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  627. Player.Character[Name].Source.Transparency = 0
  628. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
  629. Player.Character[Name].Handle.Charge2.Looped = false
  630. Player.Character[Name].Handle.Charge2.Volume = 1
  631. Player.Character[Name].Handle.Charge2.Pitch = 0.35
  632. Player.Character[Name].Handle.Charge2:Play()
  633. local beam = Instance.new("Part")
  634. beam.BrickColor = BrickColor.new("Bright green")
  635. beam.TopSurface = 0
  636. beam.BottomSurface = 0
  637. beam.Size = Vector3.new(1, 1, 1)
  638. beam.Transparency = 0.5
  639. beam.Anchored = true
  640. beam.CanCollide = false
  641. beam.CFrame = CFrame.new(position)
  642. beam.Parent = Workspace
  643. local mesh = Instance.new("CylinderMesh")
  644. mesh.Parent = beam
  645. for i = 0, 60, 1 do
  646. local shine = Instance.new("Part")
  647. shine.Name = "Shine"
  648. shine.FormFactor = "Custom"
  649. shine.Shape = "Ball"
  650. shine.CanCollide = false
  651. shine.BrickColor = BrickColor.new("Bright green")
  652. shine.TopSurface = 0
  653. shine.BottomSurface = 0
  654. shine.Size = Vector3.new(1, 1, 1)
  655. shine.Transparency = 0.25
  656. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  657. shine.Parent = Workspace
  658. local force = Instance.new("BodyPosition")
  659. force.D = 7000
  660. force.P = 100000
  661. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  662. force.position = Player.Character[Name].Source.Position
  663. force.Parent = shine
  664. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  665. mesh.Scale = Vector3.new(size * (i / 60), 10000, size * (i / 60))
  666. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 10, i / 10, i / 10)
  667. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency - 0.015
  668. wait()
  669. end
  670. for i = 0, 10 do
  671. beam.Transparency = beam.Transparency + 0.1
  672. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
  673. wait()
  674. end
  675. if beam ~= nil then beam:Remove() end
  676. Player.Character[Name].Source.Transparency = 1
  677. canFire = true
  678. local meteor = Instance.new("Part")
  679. meteor.BrickColor = BrickColor.new("Bright red")
  680. meteor.Name = "Meteor"
  681. meteor.CanCollide = true
  682. meteor.Locked = true
  683. meteor.FormFactor = "Custom"
  684. meteor.Shape = "Ball"
  685. meteor.Size = Vector3.new(size, size, size)
  686. meteor.RotVelocity = Vector3.new(math.random(-1000, 1000), math.random(-1000, 1000), math.random(-1000, 1000))
  687. meteor.Parent = Workspace
  688. meteor:BreakJoints()
  689. local fire = Instance.new("Fire")
  690. fire.Heat = 0
  691. fire.Size = 50
  692. fire.Parent = meteor
  693. local smoke = Instance.new("Smoke")
  694. smoke.RiseVelocity = 0
  695. smoke.Size = size + 3
  696. smoke.Color = Color3.new(50 / 255, 50 / 255, 50 / 255)
  697. smoke.Opacity = 0.5
  698. smoke.Parent = meteor
  699. local mesh = Instance.new("SpecialMesh")
  700. mesh.MeshType = "FileMesh"
  701. mesh.MeshId = "http://www.roblox.com/Asset/?id=1290033"
  702. mesh.TextureId = "http://www.roblox.com/Asset/?id=1290030"
  703. mesh.Scale = meteor.Size / 1.5
  704. mesh.VertexColor = Vector3.new(1, 0, 0)
  705. mesh.Parent = meteor
  706. for i = 5000, 0, -100 do
  707. meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, i, 0))
  708. meteor.Velocity = Vector3.new(0, 0, 0)
  709. wait()
  710. end
  711. meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, size / 2, 0))
  712. delay(0.1, function() Weld(target, meteor) meteor.Velocity = Vector3.new(0, 0, 0) end)
  713. meteor.Anchored = true
  714. local s = Instance.new("Sound")
  715. s.SoundId = "rbxasset://sounds\\Launching rocket.wav"
  716. s.Pitch = (30 - size) / 25
  717. s.Parent = Workspace
  718. s:Play()
  719. local shards = {}
  720. for i = 0, math.random(10, 30) do
  721. local shard = Instance.new("Part")
  722. shard.Name = "Ground Shard"
  723. shard.Anchored = true
  724. shard.Locked = true
  725. shard.BrickColor = target.BrickColor
  726. shard.Size = Vector3.new(size + 10, 2, size)
  727. shard.CFrame = CFrame.new(meteor.Position - Vector3.new(0, size / 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(math.random(0, 360)), math.rad(math.random(0, 25)))
  728. shard.Parent = Workspace
  729. table.insert(shards, shard)
  730. end
  731. local new = Instance.new("Part")
  732. new.Name = "Meteor"
  733. new.Transparency = 1
  734. new.CanCollide = false
  735. new.Anchored = true
  736. new.CFrame = CFrame.new(meteor.Position)
  737. new.Parent = Workspace
  738. local fire = Instance.new("Fire")
  739. fire.Heat = 50
  740. fire.Size = 50
  741. fire.Parent = new
  742. meteor.Fire:Remove()
  743. local shock = Instance.new("Part")
  744. shock.FormFactor = "Custom"
  745. shock.Size = Vector3.new(1, 1, 1)
  746. shock.BrickColor = BrickColor.new("Institutional white")
  747. shock.Anchored = true
  748. shock.Name = "Shock Ring"
  749. shock.CanCollide = false
  750. shock.Parent = Workspace
  751. local mesh = Instance.new("SpecialMesh")
  752. mesh.MeshType = "FileMesh"
  753. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  754. mesh.Parent = shock
  755. local tilt1 = math.random(-10, 10)
  756. local tilt2 = math.random(-10, 10)
  757. local tiltChance = math.random(1, 3)
  758. for i = 0, 50 do
  759. shock.Mesh.Scale = Vector3.new(i, i, i)
  760. if tiltChance == 1 then
  761. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
  762. elseif tiltChance == 2 then
  763. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
  764. elseif tiltChance == 3 then
  765. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
  766. end
  767. wait()
  768. end
  769. for i = 0, 1, 0.1 do
  770. shock.Transparency = i
  771. wait()
  772. end
  773. shock:Remove()
  774. wait(math.random(1, 10))
  775. if new ~= nil then new:Remove() end
  776. if meteor == nil then return end
  777. local e = Instance.new("Explosion")
  778. e.BlastPressure = 100000
  779. e.Position = meteor.Position
  780. e.BlastRadius = meteor.Size.y * 2
  781. e.Parent = Workspace
  782. local s = Instance.new("Sound")
  783. s.Name = "Explosion"
  784. s.Pitch = (30 - size) / 20
  785. s.SoundId = "http://www.roblox.com/Asset/?id=2101148"
  786. s.Parent = Workspace
  787. s:Play()
  788. for i = 0, math.random(2, 10) do
  789. local size = math.random(1, 5)
  790. local new = meteor:Clone()
  791. if new:FindFirstChild("Weld") ~= nil then new.Weld:Remove() end
  792. new.Size = Vector3.new(size, size, size)
  793. new.Mesh.Scale = Vector3.new(size, size, size)
  794. new.CanCollide = false
  795. new.Anchored = false
  796. new.CFrame = CFrame.new(meteor.Position + Vector3.new(math.random(-meteor.Size.x / 2, meteor.Size.x / 2), math.random(-meteor.Size.y / 2, meteor.Size.y / 2), math.random(-meteor.Size.z / 2, meteor.Size.z / 2))) * CFrame.fromEulerAnglesXYZ(math.random(0, 360), math.random(0, 360), math.random(0, 360))
  797. new.Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
  798. new.RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
  799. new.Smoke:Remove()
  800. new.Parent = Workspace
  801. end
  802. for i = 1, #shards do
  803. if shards[i] ~= nil then
  804. if math.random(1, 2) == 1 then
  805. shards[i]:Remove()
  806. else
  807. shards[i].CanCollide = false
  808. shards[i].Anchored = false
  809. shards[i].RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
  810. shards[i].Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
  811. end
  812. end
  813. end
  814. meteor:Remove()
  815. elseif spell == 3 then
  816. --Eccrando Bolt, energy class. Fires a charged bolt of energy gathered in your wand.
  817. canFire = false
  818. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  819. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  820. Player.Character[Name].Source.Transparency = 0
  821. Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
  822. Player.Character[Name].Handle.Charge1.Looped = false
  823. Player.Character[Name].Handle.Charge1.Volume = 1
  824. Player.Character[Name].Handle.Charge1.Pitch = 1
  825. Player.Character[Name].Handle.Charge1:Play()
  826. for i = 0, 10 do
  827. local shine = Instance.new("Part")
  828. shine.Name = "Shine"
  829. shine.FormFactor = "Custom"
  830. shine.Shape = "Ball"
  831. shine.CanCollide = false
  832. shine.BrickColor = BrickColor.new("New Yeller")
  833. shine.TopSurface = 0
  834. shine.BottomSurface = 0
  835. shine.Size = Vector3.new(1, 1, 1)
  836. shine.Transparency = 0.25
  837. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  838. shine.Parent = Workspace
  839. local force = Instance.new("BodyPosition")
  840. force.D = 7000
  841. force.P = 100000
  842. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  843. force.position = Player.Character[Name].Source.Position
  844. force.Parent = shine
  845. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  846. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  847. wait()
  848. power = power - 1
  849. end
  850. for i = 10, 20 do
  851. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  852. power = power - 1
  853. wait()
  854. end
  855. local first = true
  856. while Button1Down == true or first == true do
  857. first = false
  858. if power < 0 then break end
  859. power = power - 5
  860. if Player.Character == nil then break end
  861. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  862. if Player.Character.Humanoid.Health <= 0 then break end
  863. if Player.Character:FindFirstChild(Name) == nil then break end
  864. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  865. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  866. if selected == false then break end
  867. Player.Character[Name].Handle.Fire1.Looped = false
  868. Player.Character[Name].Handle.Fire1.Volume = 1
  869. Player.Character[Name].Handle.Fire1.Pitch = 1
  870. Player.Character[Name].Handle.Fire1:Play()
  871. local position = mouse.Hit.p
  872. local e = Instance.new("Explosion")
  873. e.BlastPressure = 500000
  874. e.BlastRadius = 10
  875. e.Position = position
  876. e.Parent = Workspace
  877. for i = 1, math.random(5, 25) do
  878. local shine = Instance.new("Part")
  879. shine.Name = "Shine"
  880. shine.FormFactor = "Custom"
  881. shine.Shape = "Block"
  882. shine.CanCollide = false
  883. shine.Anchored = true
  884. shine.BrickColor = BrickColor.new("New Yeller")
  885. shine.TopSurface = 0
  886. shine.BottomSurface = 0
  887. shine.Size = Vector3.new(1, 1, 1)
  888. shine.Transparency = 0.25
  889. shine.CFrame = CFrame.new(mouse.Hit.p)
  890. shine.Parent = Workspace
  891. local mesh = Instance.new("SpecialMesh")
  892. mesh.MeshType = "Brick"
  893. local random = math.random(3, 10) / 10
  894. mesh.Scale = Vector3.new(random, random, random)
  895. mesh.Parent = shine
  896. coroutine.resume(coroutine.create(function(part)
  897. for i = 0.25 * 25, 25 do
  898. part.Transparency = i / 25
  899. part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  900. wait(math.random(1, 5) / 100)
  901. end
  902. part:Remove()
  903. end), shine)
  904. end
  905. for i = 1, math.random(2, 5) do
  906. local shine = Instance.new("Part")
  907. shine.Name = "Shine"
  908. shine.FormFactor = "Custom"
  909. shine.Shape = "Block"
  910. shine.CanCollide = false
  911. shine.Anchored = true
  912. shine.BrickColor = BrickColor.new("New Yeller")
  913. shine.TopSurface = 0
  914. shine.BottomSurface = 0
  915. shine.Size = Vector3.new(1, 1, 1)
  916. shine.Transparency = 0.25
  917. shine.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10))
  918. shine.Parent = Workspace
  919. local mesh = Instance.new("SpecialMesh")
  920. mesh.MeshType = "Sphere"
  921. local random = math.random(3, 10) / 10
  922. mesh.Scale = Vector3.new(random, random, random)
  923. mesh.Parent = shine
  924. coroutine.resume(coroutine.create(function(part)
  925. for i = 0.25, 1, 0.05 do
  926. part.Transparency = i
  927. part.Mesh.Scale = part.Mesh.Scale + Vector3.new(1, 1, 1)
  928. wait()
  929. end
  930. part:Remove()
  931. end), shine)
  932. end
  933. local trail = Instance.new("Part")
  934. trail.BrickColor = BrickColor.new("New Yeller")
  935. trail.TopSurface = 0
  936. trail.BottomSurface = 0
  937. trail.Size = Vector3.new(1, 1, 1)
  938. trail.Transparency = 0.4
  939. trail.Anchored = true
  940. trail.CanCollide = false
  941. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + position) / 2, position)
  942. trail.Parent = Workspace
  943. local mesh = Instance.new("SpecialMesh")
  944. mesh.MeshType = "Brick"
  945. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (position - Player.Character[Name].Source.Position).magnitude)
  946. mesh.Parent = trail
  947. coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
  948. coroutine.resume(coroutine.create(function()
  949. for i = 10, 0, -1 do
  950. Player.Character[Name].Source.Transparency = (10 - i) / 10
  951. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
  952. wait()
  953. end
  954. end))
  955. wait(0.3)
  956. end
  957. Player.Character[Name].Source.Transparency = 1
  958. canFire = true
  959. elseif spell == 4 then
  960. --Eccrando Strike, energy class. Use the clouds to your advantage and fire bolts of lightning at the ground.
  961. while Button1Down == true do
  962. if Player.Character == nil then break end
  963. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  964. if Player.Character.Humanoid.Health <= 0 then break end
  965. if Player.Character:FindFirstChild(Name) == nil then break end
  966. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  967. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  968. if selected == false then break end
  969. while power <= 25 and Button1Down == true do
  970. wait()
  971. end
  972. if power <= 0 then break end
  973. canFire = false
  974. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  975. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  976. Player.Character[Name].Source.Transparency = 0
  977. Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
  978. Player.Character[Name].Handle.Charge1.Looped = false
  979. Player.Character[Name].Handle.Charge1.Volume = 1
  980. Player.Character[Name].Handle.Charge1.Pitch = 0.4
  981. Player.Character[Name].Handle.Charge1:Play()
  982. for i = 0, 50 do
  983. local shine = Instance.new("Part")
  984. shine.Name = "Shine"
  985. shine.FormFactor = "Custom"
  986. shine.Shape = "Ball"
  987. shine.CanCollide = false
  988. shine.BrickColor = BrickColor.new("New Yeller")
  989. shine.TopSurface = 0
  990. shine.BottomSurface = 0
  991. shine.Size = Vector3.new(1, 1, 1)
  992. shine.Transparency = 0.25
  993. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  994. shine.Parent = Workspace
  995. local force = Instance.new("BodyPosition")
  996. force.D = 7000
  997. force.P = 100000
  998. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  999. force.position = Player.Character[Name].Source.Position
  1000. force.Parent = shine
  1001. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  1002. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  1003. power = power - 1
  1004. wait()
  1005. end
  1006. power = power - 10
  1007. if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
  1008. local s = Instance.new("Sound")
  1009. s.Volume = math.random(10, 50) / 10
  1010. s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
  1011. s.Pitch = math.random(9, 11) / 10
  1012. s.Parent = Workspace
  1013. s:Play()
  1014. if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
  1015. local s = Instance.new("Sound")
  1016. s.Volume = math.random(1, 10) / 10
  1017. s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
  1018. s.Pitch = math.random(1, 30) / 10
  1019. s.Parent = Workspace
  1020. s:Play()
  1021. if selected == false then break end
  1022. local e = Instance.new("Explosion")
  1023. e.BlastPressure = 1000000
  1024. e.BlastRadius = 25
  1025. e.Position = mouse.Hit.p
  1026. e.Parent = Workspace
  1027. local pos = (mouse.Hit.p + Vector3.new(math.random(-100, 100), 1000, math.random(-100, 100)))
  1028. local trail = Instance.new("Part")
  1029. trail.BrickColor = BrickColor.new("New Yeller")
  1030. trail.TopSurface = 0
  1031. trail.BottomSurface = 0
  1032. trail.Size = Vector3.new(1, 1, 1)
  1033. trail.Transparency = 0.4
  1034. trail.Anchored = true
  1035. trail.CanCollide = false
  1036. trail.CFrame = CFrame.new((pos + mouse.Hit.p) / 2, mouse.Hit.p)
  1037. trail.Parent = Workspace
  1038. local mesh = Instance.new("SpecialMesh")
  1039. mesh.MeshType = "Brick"
  1040. mesh.Scale = Vector3.new(math.random(40, 50) / 10, math.random(40, 50) / 10, (mouse.Hit.p - pos).magnitude + 10)
  1041. mesh.Parent = trail
  1042. coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
  1043. for i = 10, 0, -1 do
  1044. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
  1045. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
  1046. wait()
  1047. end
  1048. Player.Character[Name].Source.Transparency = 1
  1049. wait(0.1)
  1050. canFire = true
  1051. end
  1052. elseif spell == 5 then
  1053. --Thius Dae, health-based class. Seep life from your enemies to save yourself. Works as a general defense against multiple enemies.
  1054. canFire = false
  1055. Player.Character[Name].Source.Mesh.MeshType = "Brick"
  1056. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1057. Player.Character[Name].Source.Transparency = 0.25
  1058. Player.Character[Name].Source.BrickColor = BrickColor.new("Really black")
  1059. Player.Character[Name].Handle.Charge4.Looped = true
  1060. Player.Character[Name].Handle.Charge4.Volume = 1
  1061. Player.Character[Name].Handle.Charge4.Pitch = 1
  1062. Player.Character[Name].Handle.Charge4:Play()
  1063. for i = 0, 10 do
  1064. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.11
  1065. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1066. wait()
  1067. end
  1068. for i = 0, math.huge, 0.1 do
  1069. if Button1Down == false then break end
  1070. if Player.Character == nil then break end
  1071. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1072. if Player.Character.Humanoid.Health <= 0 then break end
  1073. if Player.Character:FindFirstChild(Name) == nil then break end
  1074. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1075. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1076. if power <= 0 then break end
  1077. local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
  1078. if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
  1079. power = power - 1
  1080. end
  1081. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1082. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
  1083. local shine = Instance.new("Part")
  1084. shine.Name = "Shine"
  1085. shine.FormFactor = "Custom"
  1086. shine.Shape = "Block"
  1087. shine.CanCollide = false
  1088. shine.Anchored = true
  1089. shine.BrickColor = BrickColor.new("Really black")
  1090. shine.TopSurface = 0
  1091. shine.BottomSurface = 0
  1092. shine.Size = Vector3.new(1, 1, 1)
  1093. shine.Transparency = 0.25
  1094. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position)
  1095. shine.Parent = Workspace
  1096. local mesh = Instance.new("SpecialMesh")
  1097. mesh.MeshType = "Brick"
  1098. local random = math.random(3, 10) / 10
  1099. mesh.Scale = Vector3.new(random, random, random)
  1100. mesh.Parent = shine
  1101. coroutine.resume(coroutine.create(function(part)
  1102. for i = 0.25 * 25, 25 do
  1103. part.Transparency = i / 25
  1104. part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1105. wait(math.random(1, 5) / 100)
  1106. end
  1107. part:Remove()
  1108. end), shine)
  1109. for _, model in pairs(Workspace:GetChildren()) do
  1110. if model ~= Player.Character then
  1111. if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
  1112. if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
  1113. local trail = Instance.new("Part")
  1114. trail.BrickColor = BrickColor.new("Really black")
  1115. trail.TopSurface = 0
  1116. trail.BottomSurface = 0
  1117. trail.Size = Vector3.new(1, 1, 1)
  1118. trail.Transparency = 0.4
  1119. trail.Anchored = true
  1120. trail.CanCollide = false
  1121. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
  1122. trail.Parent = Workspace
  1123. local mesh = Instance.new("SpecialMesh")
  1124. mesh.MeshType = "Brick"
  1125. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
  1126. mesh.Parent = trail
  1127. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
  1128. if model.Humanoid.Health > 0 then
  1129. model.Humanoid:TakeDamage(1.25)
  1130. Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + (1.25 / 2)
  1131. elseif model.Humanoid.Health <= 0 then
  1132. model.Humanoid.Health = 0
  1133. model.Humanoid.Name = "HumanoidAbsorbed"
  1134. for _, part in pairs(model:GetChildren()) do
  1135. if part.ClassName == "Part" then
  1136. local position = Instance.new("BodyPosition")
  1137. position.Name = "Thius Dae"
  1138. position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1139. position.P = 1000
  1140. position.D = 50
  1141. position.Parent = part
  1142. position.position = Player.Character[Name].Source.Position
  1143. coroutine.resume(coroutine.create(function() while position.Parent ~= nil do position.position = Player.Character[Name].Source.Position part.CanCollide = false wait() end end))
  1144. coroutine.resume(coroutine.create(function() wait(3.5) position:Remove() end))
  1145. end
  1146. end
  1147. Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + 5
  1148. power = power + 25
  1149. Player.Character[Name].Handle.Fire4.Looped = false
  1150. Player.Character[Name].Handle.Fire4.Volume = 1
  1151. Player.Character[Name].Handle.Fire4.Pitch = 1
  1152. Player.Character[Name].Handle.Fire4:Play()
  1153. end
  1154. end
  1155. end
  1156. end
  1157. end
  1158. wait()
  1159. end
  1160. for i = 0, 25 do
  1161. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
  1162. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1163. Player.Character[Name].Handle.Charge4.Volume = (25 - i) / 25
  1164. wait()
  1165. end
  1166. Player.Character[Name].Handle.Charge4:Stop()
  1167. Player.Character[Name].Source.Transparency = 1
  1168. Player.Character[Name].Source.Weld.C0 = CFrame.new()
  1169. canFire = true
  1170. elseif spell == 6 then
  1171. --Thius Heed, health-based class. Heal people around you and sheild them.
  1172. canFire = false
  1173. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1174. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1175. Player.Character[Name].Source.Transparency = 0.25
  1176. Player.Character[Name].Source.BrickColor = BrickColor.new("Institutional white")
  1177. Player.Character[Name].Source.Fire.Enabled = true
  1178. Player.Character[Name].Source.Fire.Heat = 10
  1179. Player.Character[Name].Source.Fire.Size = 1
  1180. Player.Character[Name].Source.Fire.Color = Color3.new(1, 1, 1)
  1181. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1182. Player.Character[Name].Handle.Shine.Looped = true
  1183. Player.Character[Name].Handle.Shine.Volume = 1
  1184. Player.Character[Name].Handle.Shine.Pitch = 1
  1185. Player.Character[Name].Handle.Shine:Play()
  1186. for i = 0, 5 do
  1187. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.2
  1188. Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size * 1.2
  1189. wait()
  1190. end
  1191. local heed = Instance.new("ForceField")
  1192. heed.Name = "HeedShield"
  1193. for i = 0, math.huge, 0.1 do
  1194. if Button1Down == false then break end
  1195. if Player.Character == nil then break end
  1196. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1197. if Player.Character.Humanoid.Health <= 0 then break end
  1198. if Player.Character:FindFirstChild(Name) == nil then break end
  1199. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1200. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1201. if power <= 0 then break end
  1202. local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
  1203. if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
  1204. power = power - 1
  1205. end
  1206. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
  1207. Player.Character[Name].Source.Fire.Size = math.sin(i) + 10
  1208. Player.Character[Name].Source.Fire.Heat = math.sin(i) + 10
  1209. for _, model in pairs(Workspace:GetChildren()) do
  1210. if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
  1211. if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
  1212. local trail = Instance.new("Part")
  1213. trail.BrickColor = BrickColor.new("Institutional white")
  1214. trail.TopSurface = 0
  1215. trail.BottomSurface = 0
  1216. trail.Size = Vector3.new(1, 1, 1)
  1217. trail.Transparency = 0.4
  1218. trail.Anchored = true
  1219. trail.CanCollide = false
  1220. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
  1221. trail.Parent = Workspace
  1222. local mesh = Instance.new("SpecialMesh")
  1223. mesh.MeshType = "Brick"
  1224. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
  1225. mesh.Parent = trail
  1226. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
  1227. model.Humanoid.Health = model.Humanoid.Health + 1.25
  1228. heed:Clone().Parent = model
  1229. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), model.HeedShield)
  1230. end
  1231. end
  1232. end
  1233. wait()
  1234. end
  1235. for i = 0, 25 do
  1236. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
  1237. Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size / 1.15
  1238. Player.Character[Name].Source.Fire.Heat = Player.Character[Name].Source.Fire.Heat / 1.15
  1239. Player.Character[Name].Handle.Shine.Volume = (25 - i) / 25
  1240. wait()
  1241. end
  1242. Player.Character[Name].Handle.Shine:Stop()
  1243. Player.Character[Name].Source.Transparency = 1
  1244. Player.Character[Name].Source.Fire.Enabled = false
  1245. canFire = true
  1246. elseif spell == 7 then
  1247. --Combuscus Phore, fire/explosives class. A small explosion with a bit of magic makes to be a spectacular performance.
  1248. canFire = false
  1249. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1250. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1251. Player.Character[Name].Source.Transparency = 0.25
  1252. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1253. Player.Character[Name].Source.Fire.Enabled = true
  1254. Player.Character[Name].Source.Fire.Heat = 10
  1255. Player.Character[Name].Source.Fire.Size = 10
  1256. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1257. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1258. Player.Character[Name].Handle.Bolt.Looped = false
  1259. Player.Character[Name].Handle.Bolt.Volume = 1
  1260. Player.Character[Name].Handle.Bolt.Pitch = 1.5
  1261. Player.Character[Name].Handle.Bolt:Play()
  1262. power = power - 75
  1263. local shock = Instance.new("Part")
  1264. shock.FormFactor = "Custom"
  1265. shock.Size = Vector3.new(1, 1, 1)
  1266. shock.BrickColor = BrickColor.new("Really red")
  1267. shock.Anchored = true
  1268. shock.Name = "Shock Ring"
  1269. shock.CanCollide = false
  1270. shock.Parent = Workspace
  1271. local mesh = Instance.new("SpecialMesh")
  1272. mesh.MeshType = "FileMesh"
  1273. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1274. mesh.Parent = shock
  1275. local tilt1 = math.random(-10, 10)
  1276. local tilt2 = math.random(-10, 10)
  1277. local tiltChance = math.random(1, 3)
  1278. for i = 0, 25 do
  1279. Player.Character[Name].Handle.Bolt.Pitch = Player.Character[Name].Handle.Bolt.Pitch - 0.1
  1280. shock.Mesh.Scale = Vector3.new(i, i, i) * (25 - i)
  1281. if tiltChance == 1 then
  1282. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
  1283. elseif tiltChance == 2 then
  1284. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
  1285. elseif tiltChance == 3 then
  1286. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
  1287. end
  1288. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 5) * (25 - i)
  1289. Player.Character[Name].Source.Fire.Size = (i / 5) * (25 - i)
  1290. Player.Character[Name].Source.Fire.Heat = (i / 5) * (25 - i)
  1291. for _, model in pairs(Workspace:GetChildren()) do
  1292. if model.ClassName == "Part" then
  1293. if (Player.Character.Torso.Position - model.Position).magnitude <= (i * (25 - i)) / 2 and model.Anchored == false then
  1294. model.Velocity = ((model.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
  1295. if math.random(1, 10) == 1 then model:BreakJoints() end
  1296. end
  1297. elseif model.ClassName == "Model" and model ~= Player.Character then
  1298. for _, x in pairs(model:GetChildren()) do
  1299. if x.ClassName == "Part" then
  1300. if (Player.Character.Torso.Position - x.Position).magnitude <= (i * (25 - i)) / 2 and x.Anchored == false then
  1301. x.Velocity = ((x.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
  1302. if math.random(1, 10) == 1 then x:BreakJoints() end
  1303. if model:FindFirstChild("Humanoid") ~= nil then
  1304. model.Humanoid:TakeDamage(10)
  1305. model.Humanoid.Sit = true
  1306. end
  1307. end
  1308. end
  1309. end
  1310. end
  1311. end
  1312. wait(0.03)
  1313. end
  1314. shock:Remove()
  1315. Player.Character[Name].Source.Transparency = 1
  1316. Player.Character[Name].Source.Fire.Enabled = false
  1317. canFire = true
  1318. elseif spell == 8 then
  1319. --Combuscus Burn, fire/explosives class. Basically, light things on fire.
  1320. canFire = false
  1321. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1322. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1323. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1324. Player.Character[Name].Handle.Fire3.Looped = false
  1325. Player.Character[Name].Handle.Fire3.Volume = 1
  1326. Player.Character[Name].Handle.Fire3.Pitch = 1
  1327. Player.Character[Name].Handle.Fire3:Play()
  1328. Player.Character[Name].Handle.Fire4.Looped = false
  1329. Player.Character[Name].Handle.Fire4.Volume = 1
  1330. Player.Character[Name].Handle.Fire4.Pitch = 1
  1331. Player.Character[Name].Handle.Fire4:Play()
  1332. coroutine.resume(coroutine.create(function()
  1333. for i = 0, 1, 0.1 do
  1334. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
  1335. Player.Character[Name].Source.Transparency = i
  1336. wait()
  1337. end
  1338. Player.Character[Name].Source.Transparency = 1
  1339. end))
  1340. if mouse.Target == nil then return end
  1341. if mouse.Target.Parent == nil then return end
  1342. local function SetFire(target, offset)
  1343. if target == nil then return end
  1344. if offset == nil then offset = Vector3.new(0, 0, 0) end
  1345. if target:GetMass() > 3500 then return end
  1346. if target.Name == "CombuscusBurnFire" then return end
  1347. if target:FindFirstChild("CombuscusBurnFire") ~= nil then return end
  1348. if target:FindFirstChild("ForceField") ~= nil then return end
  1349. if target.Parent == nil then return end
  1350. if target.Parent:FindFirstChild("ForceField") ~= nil then return end
  1351. if target.Parent:FindFirstChild("HeedShield") ~= nil then return end
  1352. local check = Instance.new("Model")
  1353. check.Name = "CombuscusBurnFire"
  1354. check.Parent = target
  1355. delay(math.random(0.1, 2), function() if target ~= nil then target.Touched:connect(function(hit) if target:FindFirstChild("CombuscusBurnFire") ~= nil then SetFire(hit) end end) end end)
  1356. local part = Instance.new("Part")
  1357. part.Name = "CombuscusBurnFire"
  1358. part.CanCollide = false
  1359. part.Anchored = true
  1360. Part.FormFactor = "Custom"
  1361. part.Size = Vector3.new(1, 1, 1)
  1362. part.TopSurface = 0
  1363. part.BottomSurface = 0
  1364. part.Transparency = 1
  1365. part.Parent = Workspace
  1366. local fire = Instance.new("Fire")
  1367. fire.Color = Color3.new(1, math.random(10, 30) / 100, 0)
  1368. fire.SecondaryColor = Color3.new(1, 1, 1)
  1369. fire.Size = math.random(4, 15)
  1370. fire.Heat = fire.Size + 3
  1371. fire.Parent = part
  1372. local smoke = Instance.new("Smoke")
  1373. smoke.Color = Color3.new(0.5, 0.5, 0.5)
  1374. smoke.Size = fire.Size + 3
  1375. smoke.RiseVelocity = fire.Heat / 5
  1376. smoke.Opacity = math.random(1, 15) / 100
  1377. smoke.Parent = part
  1378. local sound = Instance.new("Sound")
  1379. sound.SoundId = "http://www.roblox.com/Asset/?id=31760113"
  1380. sound.Volume = 1
  1381. sound.Pitch = 1
  1382. sound.Looped = true
  1383. sound.Parent = part
  1384. sound:Play()
  1385. coroutine.resume(coroutine.create(function()
  1386. for i = 1, math.random(100, 1000) do
  1387. if part.Parent == nil then break end
  1388. if target.Parent == nil then break end
  1389. if target.Parent.Parent == nil then break end
  1390. if target:FindFirstChild("CombuscusBurnFire") == nil then break end
  1391. if Player.Character == nil then break end
  1392. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1393. if Player.Character.Humanoid.Health <= 0 then break end
  1394. part.CFrame = CFrame.new(target.Position + offset)
  1395. if target.Parent:FindFirstChild("Humanoid") ~= nil then
  1396. target.Parent.Humanoid:TakeDamage(0.25)
  1397. end
  1398. if math.random(1, 100) == 1 then target:BreakJoints() end
  1399. if math.random(1, 25) == 1 and target.Anchored == false then target.BrickColor = BrickColor.new("Really black") end
  1400. if math.random(1, 50) == 1 and target.Anchored == false then target.Velocity = target.Velocity + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)) end
  1401. wait()
  1402. end
  1403. for i = 1, 0, -0.05 do
  1404. sound.Volume = i
  1405. fire.Size = fire.Size / 1.025
  1406. fire.Heat = fire.Heat / 1.01
  1407. fire.Color = Color3.new(1 * i, 0.25 * i, 0)
  1408. fire.SecondaryColor = Color3.new(1 * i, 1 * i, 1 * i)
  1409. smoke.Size = smoke.Size / 1.05
  1410. smoke.RiseVelocity = smoke.RiseVelocity / 1.05
  1411. smoke.Opacity = smoke.Opacity / 1.05
  1412. wait()
  1413. end
  1414. sound:Stop()
  1415. fire.Enabled = false
  1416. smoke.Enabled = false
  1417. if target ~= nil then if target:FindFirstChild("CombuscusBurnFire") ~= nil then target.CombuscusBurnFire:Remove() end end
  1418. wait(3)
  1419. part:Remove()
  1420. end))
  1421. end
  1422. pcall(function() SetFire(mouse.Target, mouse.Hit.p - mouse.Target.Position) end)
  1423. canFire = true
  1424. elseif spell == 9 then
  1425. --Combuscus Vortex, fire/explosives class. A tornado in a can.
  1426. canFire = false
  1427. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1428. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1429. Player.Character[Name].Source.Transparency = 0.25
  1430. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1431. Player.Character[Name].Source.Fire.Enabled = true
  1432. Player.Character[Name].Source.Fire.Heat = 10
  1433. Player.Character[Name].Source.Fire.Size = 10
  1434. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1435. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1436. Player.Character[Name].Handle.Charge2.Looped = false
  1437. Player.Character[Name].Handle.Charge2.Volume = 1
  1438. Player.Character[Name].Handle.Charge2.Pitch = 0.125
  1439. Player.Character[Name].Handle.Charge2:Play()
  1440. power = power - 50
  1441. for i = 0, 75 do
  1442. if math.random(1, 3) == 1 then
  1443. local shock = Instance.new("Part")
  1444. shock.FormFactor = "Custom"
  1445. shock.Size = Vector3.new(1, 1, 1)
  1446. shock.BrickColor = BrickColor.new("Really red")
  1447. shock.Anchored = true
  1448. shock.Name = "Shock Ring"
  1449. shock.CanCollide = false
  1450. shock.Parent = Workspace
  1451. local mesh = Instance.new("SpecialMesh")
  1452. mesh.MeshType = "FileMesh"
  1453. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1454. mesh.Parent = shock
  1455. coroutine.resume(coroutine.create(function()
  1456. local tilt1 = math.random(-10, 10)
  1457. local tilt2 = math.random(-10, 10)
  1458. local tiltChance = math.random(1, 3)
  1459. local randomSize = math.random(-10, 10)
  1460. for x = 1, 25 do
  1461. shock.Mesh.Scale = Vector3.new(5 + x, 5 + x, 5 + (x / 5)) + Vector3.new(randomSize, randomSize, randomSize)
  1462. if tiltChance == 1 then
  1463. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), 0, 0)
  1464. elseif tiltChance == 2 then
  1465. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2 / (25 - x)), 0)
  1466. elseif tiltChance == 3 then
  1467. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), math.rad(tilt2 / (25 - x)), 0)
  1468. end
  1469. wait()
  1470. end
  1471. end))
  1472. end
  1473. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i, i, i) / 5
  1474. Player.Character[Name].Source.Fire.Size = i / 5
  1475. Player.Character[Name].Source.Fire.Heat = i / 5
  1476. for _, model in pairs(Workspace:GetChildren()) do
  1477. if model.ClassName == "Part" then
  1478. if (Player.Character.Torso.Position - model.Position).magnitude <= 50 and model.Anchored == false then
  1479. model.CanCollide = false
  1480. model.Transparency = 0.5
  1481. local Position = Instance.new("BodyPosition")
  1482. Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1483. Position.P = 100
  1484. Position.D = 10
  1485. Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
  1486. Position.Parent = model
  1487. coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
  1488. if math.random(1, 10) == 1 then model:BreakJoints() end
  1489. end
  1490. elseif model.ClassName == "Model" and model ~= Player.Character then
  1491. for _, x in pairs(model:GetChildren()) do
  1492. if x.ClassName == "Part" then
  1493. if (Player.Character.Torso.Position - x.Position).magnitude <= 50 and x.Anchored == false then
  1494. x.CanCollide = false
  1495. local Position = Instance.new("BodyPosition")
  1496. Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1497. Position.P = 500
  1498. Position.D = 10
  1499. Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 7.5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
  1500. Position.Parent = x
  1501. coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
  1502. if math.random(1, 10) == 1 then x:BreakJoints() end
  1503. if model:FindFirstChild("Humanoid") ~= nil then
  1504. model.Humanoid:TakeDamage(10)
  1505. model.Humanoid.Sit = true
  1506. end
  1507. end
  1508. end
  1509. end
  1510. end
  1511. end
  1512. wait(0.03)
  1513. end
  1514. Player.Character[Name].Handle.Fire2.Looped = false
  1515. Player.Character[Name].Handle.Fire2.Volume = 1
  1516. Player.Character[Name].Handle.Fire2.Pitch = 0.3
  1517. Player.Character[Name].Handle.Fire2:Play()
  1518. Player.Character[Name].Source.Fire.Enabled = false
  1519. for i = 0.25, 1, 0.05 do
  1520. Player.Character[Name].Source.Transparency = i
  1521. wait()
  1522. end
  1523. Player.Character[Name].Source.Transparency = 1
  1524. canFire = true
  1525. elseif spell == 10 then
  1526. --Combuscus Phore Nexus, fire/explosives class. Basically the outcome is similar to that of a nuclear warhead.
  1527. canFire = false
  1528. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1529. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1530. Player.Character[Name].Source.Transparency = 0.25
  1531. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1532. Player.Character[Name].Source.Fire.Enabled = true
  1533. Player.Character[Name].Source.Fire.Heat = 10
  1534. Player.Character[Name].Source.Fire.Size = 10
  1535. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1536. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1537. Player.Character[Name].Handle.Fire1.Looped = false
  1538. Player.Character[Name].Handle.Fire1.Volume = 1
  1539. Player.Character[Name].Handle.Fire1.Pitch = math.random(3, 6) / 10
  1540. local new = Player.Character[Name].Handle.Fire1:Clone()
  1541. new.Parent = Workspace
  1542. new:Play()
  1543. Player.Character[Name].Handle.Charge3.Looped = false
  1544. Player.Character[Name].Handle.Charge3.Volume = 1
  1545. Player.Character[Name].Handle.Charge3.Pitch = math.random(15, 20) / 10
  1546. local new = Player.Character[Name].Handle.Charge3:Clone()
  1547. new.Parent = Workspace
  1548. new:Play()
  1549. Player.Character[Name].Handle.Fire4.Looped = false
  1550. Player.Character[Name].Handle.Fire4.Volume = 1
  1551. Player.Character[Name].Handle.Fire4.Pitch = math.random(2, 4) / 10
  1552. local new = Player.Character[Name].Handle.Fire4:Clone()
  1553. new.Parent = Workspace
  1554. new:Play()
  1555. power = power - 100
  1556. local shock = Instance.new("Part")
  1557. shock.FormFactor = "Custom"
  1558. shock.Size = Vector3.new(1, 1, 1)
  1559. shock.BrickColor = BrickColor.new("Really red")
  1560. shock.Anchored = true
  1561. shock.Name = "Shock Ring"
  1562. shock.CanCollide = false
  1563. shock.Parent = Workspace
  1564. local mesh = Instance.new("SpecialMesh")
  1565. mesh.MeshType = "FileMesh"
  1566. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1567. mesh.Parent = shock
  1568. local shock2 = shock:Clone()
  1569. shock2.Parent = Workspace
  1570. local shock3 = shock:Clone()
  1571. shock3.Parent = Workspace
  1572. local shockAngle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1573. local shock2Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1574. local shock3Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1575. local shock2Size = math.random(2, 3)
  1576. local shock3Size = math.random(4, 6)
  1577. for i = 0, 500, 10 do
  1578. if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
  1579. local shock4 = Instance.new("Part")
  1580. shock4.FormFactor = "Custom"
  1581. shock4.Size = Vector3.new(1, 1, 1)
  1582. shock4.BrickColor = BrickColor.new("Really red")
  1583. shock4.Anchored = true
  1584. shock4.Name = "Shock Ring"
  1585. shock4.CanCollide = false
  1586. shock4.Parent = Workspace
  1587. shock4.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)))
  1588. local mesh = Instance.new("SpecialMesh")
  1589. mesh.MeshType = "FileMesh"
  1590. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  1591. mesh.Parent = shock4
  1592. coroutine.resume(coroutine.create(function(part)
  1593. for i = 0, 1, 0.05 do
  1594. part.Transparency = i
  1595. part.Mesh.Scale = Vector3.new(i * 25, i * 25, i * 25)
  1596. wait()
  1597. end
  1598. part:Remove()
  1599. end), shock4)
  1600. end
  1601. shock.Transparency = i / 500
  1602. shock2.Transparency = i / 500
  1603. shock3.Transparency = i / 500
  1604. Player.Character[Name].Source.Transparency = i / 250
  1605. shock.Mesh.Scale = Vector3.new(i, i, i)
  1606. shock2.Mesh.Scale = Vector3.new(i, i, i) / shock2Size
  1607. shock3.Mesh.Scale = Vector3.new(i, i, i) / shock3Size
  1608. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shockAngle
  1609. shock2.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock2Angle
  1610. shock3.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock3Angle
  1611. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 15)
  1612. Player.Character[Name].Source.Fire.Size = (i / 15)
  1613. Player.Character[Name].Source.Fire.Heat = (i / 15)
  1614. for _, model in pairs(Workspace:GetChildren()) do
  1615. if model.ClassName == "Part" then
  1616. if (Player.Character.Torso.Position - model.Position).magnitude <= i / 2 and model.Anchored == false then
  1617. model.Velocity = (model.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
  1618. if math.random(1, 10) == 1 then model:BreakJoints() end
  1619. end
  1620. elseif model.ClassName == "Model" and model ~= Player.Character then
  1621. for _, x in pairs(model:GetChildren()) do
  1622. if x.ClassName == "Part" then
  1623. if (Player.Character.Torso.Position - x.Position).magnitude <= i / 2 and x.Anchored == false then
  1624. x.Velocity = (x.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
  1625. if math.random(1, 10) == 1 then x:BreakJoints() end
  1626. if model:FindFirstChild("Humanoid") ~= nil then
  1627. model.Humanoid:TakeDamage(10)
  1628. model.Humanoid.Sit = true
  1629. end
  1630. end
  1631. end
  1632. end
  1633. end
  1634. end
  1635. wait(0.03)
  1636. end
  1637. shock:Remove()
  1638. shock2:Remove()
  1639. shock3:Remove()
  1640. Player.Character[Name].Source.Transparency = 1
  1641. Player.Character[Name].Source.Fire.Enabled = false
  1642. canFire = true
  1643. elseif spell == 11 then
  1644. --Kanamla Cysis, object manipulation class. The easiest spell in it's class allows you to lightly pick things up.
  1645. local target = mouse.Target
  1646. if target == nil then return end
  1647. if target.Parent == nil then return end
  1648. if target.Anchored == true then return end
  1649. if (target.Position - Player.Character[Name].Source.Position).magnitude > 25 then return end
  1650. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent) ~= nil then
  1651. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Torso") ~= nil then
  1652. target = game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Torso
  1653. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Humanoid") ~= nil then
  1654. game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Humanoid.PlatformStand = true
  1655. end
  1656. end
  1657. end
  1658. local position = Instance.new("BodyPosition")
  1659. position.Name = "Cysis"
  1660. position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1661. position.P = 1000
  1662. position.D = 50
  1663. position.Parent = target
  1664. position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
  1665. canFire = false
  1666. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1667. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1668. Player.Character[Name].Source.Transparency = 0.25
  1669. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
  1670. Player.Character[Name].Source.Fire.Enabled = true
  1671. Player.Character[Name].Source.Fire.Heat = 10
  1672. Player.Character[Name].Source.Fire.Size = 2
  1673. Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
  1674. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(0.5, 0.5, 1)
  1675. Player.Character[Name].Handle.Shine.Looped = false
  1676. Player.Character[Name].Handle.Shine.Volume = 1
  1677. Player.Character[Name].Handle.Shine.Pitch = 0.75
  1678. Player.Character[Name].Handle.Shine:Play()
  1679. for i = 0, math.huge do
  1680. if Button1Down == false then break end
  1681. if Player.Character == nil then break end
  1682. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1683. if Player.Character.Humanoid.Health <= 0 then break end
  1684. if Player.Character:FindFirstChild(Name) == nil then break end
  1685. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1686. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1687. if power <= 0 then break end
  1688. if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
  1689. power = power - 1
  1690. end
  1691. if target ~= nil and position ~= nil then
  1692. position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
  1693. end
  1694. wait()
  1695. end
  1696. if position ~= nil then position:Remove() end
  1697. if target ~= nil then
  1698. if target.Parent:FindFirstChild("Humanoid") ~= nil then
  1699. target.Parent.Humanoid.PlatformStand = false
  1700. target.Parent.Humanoid.Sit = true
  1701. end
  1702. end
  1703. for i = 0.25, 1, 0.05 do
  1704. Player.Character[Name].Source.Transparency = i
  1705. wait()
  1706. end
  1707. Player.Character[Name].Source.Transparency = 1
  1708. Player.Character[Name].Source.Fire.Enabled = false
  1709. canFire = true
  1710. elseif spell == 12 then
  1711. --Kanamla Tepidift, object manipulation class. Allows you to teleport from one area to another.
  1712. canFire = false
  1713. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1714. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
  1715. Player.Character[Name].Source.Fire.Enabled = true
  1716. Player.Character[Name].Source.Fire.Heat = 0
  1717. Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
  1718. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1719. Player.Character[Name].Handle.Shine.Looped = true
  1720. Player.Character[Name].Handle.Shine.Pitch = 1.5
  1721. Player.Character[Name].Handle.Shine.Volume = 1
  1722. Player.Character[Name].Handle.Shine:Play()
  1723. for i = 1, 0, -0.05 do
  1724. Player.Character[Name].Source.Transparency = i
  1725. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1726. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1727. wait()
  1728. end
  1729. local maxDistance = (Player.Character.Torso.Position - mouse.Hit.p).magnitude
  1730. if maxDistance < 500 then
  1731. local pos1 = Player.Character.Torso.Position
  1732. local pos2 = mouse.Hit.p + Vector3.new(0, 3, 0)
  1733. local pos0 = pos1
  1734. for distance = 1, maxDistance, 5 do
  1735. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -distance)).p
  1736. Player.Character.Torso.CFrame = CFrame.new(pos0, pos2)
  1737. Player.Character.Torso.Velocity = Vector3.new()
  1738. power = power - 1
  1739. wait()
  1740. end
  1741. Player.Character.Torso.CFrame = CFrame.new(pos2)
  1742. for i = 0, 1, 0.05 do
  1743. Player.Character[Name].Source.Transparency = i
  1744. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1745. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1746. Player.Character[Name].Handle.Shine.Volume = (1 - i)
  1747. wait()
  1748. end
  1749. Player.Character[Name].Handle.Shine:Stop()
  1750. else
  1751. for i = 0, 1, 0.05 do
  1752. Player.Character[Name].Source.BrickColor = Player.Character[Name].Source.BrickColor == BrickColor.new("Bright blue") and BrickColor.new("Really red") or BrickColor.new("Bright blue")
  1753. Player.Character[Name].Source.Transparency = i
  1754. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1755. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1756. Player.Character[Name].Source.Fire.Color = Player.Character[Name].Source.Fire.Color == Color3.new(0, 0, 1) and Color3.new(1, 0, 0) or Color3.new(0, 0, 1)
  1757. Player.Character[Name].Source.Fire.SecondaryColor = Player.Character[Name].Source.Fire.SecondaryColor == Color3.new(1, 1, 1) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1)
  1758. Player.Character[Name].Handle.Shine.Pitch = (1 - i) + 0.5
  1759. wait()
  1760. end
  1761. Player.Character[Name].Handle.Shine:Stop()
  1762. end
  1763. Player.Character[Name].Source.Transparency = 1
  1764. Player.Character[Name].Source.Fire.Enabled = false
  1765. canFire = true
  1766. elseif spell == 13 then
  1767. --Kanamla Jump, object manipulation class. Allows you to jump really high.
  1768. canFire = false
  1769. while Button1Down == true do
  1770. if power <= 0 then break end
  1771. Player.Character[Name].Handle.Fire3.Looped = false
  1772. Player.Character[Name].Handle.Fire3.Pitch = 1
  1773. Player.Character[Name].Handle.Fire3.Volume = 1
  1774. for i = 1, 2 do Player.Character[Name].Handle.Fire3:Play() end
  1775. Player.Character[Name].Source.BrickColor = BrickColor.new("Really blue")
  1776. Player.Character.Humanoid.PlatformStand = true
  1777. Player.Character.Torso.Velocity = Vector3.new(Player.Character.Torso.Velocity.x, (Player.Character.Torso.Velocity.y / 2) + 100, Player.Character.Torso.Velocity.z)
  1778. power = power - 5
  1779. local shock = Instance.new("Part")
  1780. shock.FormFactor = "Custom"
  1781. shock.Size = Vector3.new(1, 1, 1)
  1782. shock.BrickColor = BrickColor.new("Really blue")
  1783. shock.Anchored = true
  1784. shock.Name = "Shock Ring"
  1785. shock.CanCollide = false
  1786. shock.Parent = Workspace
  1787. local mesh = Instance.new("SpecialMesh")
  1788. mesh.MeshType = "FileMesh"
  1789. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  1790. mesh.Scale = Vector3.new(1, 1, 1)
  1791. mesh.Parent = shock
  1792. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2.5, 0))
  1793. coroutine.resume(coroutine.create(function()
  1794. for i = 0, 50 do
  1795. mesh.Scale = Vector3.new(i, i / 5, i)
  1796. shock.Transparency = i / 50
  1797. wait()
  1798. end
  1799. shock:Remove()
  1800. end))
  1801. for i = 0, 1, 0.2 do
  1802. Player.Character[Name].Source.Transparency = i
  1803. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5)
  1804. wait()
  1805. end
  1806. Player.Character[Name].Source.Transparency = 1
  1807. Player.Character.Humanoid.PlatformStand = false
  1808. end
  1809. canFire = true
  1810. elseif spell == 14 then
  1811. --Candora Hide, light manipulation class. The Hide spell makes you and your wand seem invisible to the naked eye by bending light around your limbs.
  1812. canFire = false
  1813. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1814. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1815. Player.Character[Name].Source.BrickColor = BrickColor.new("Royal purple")
  1816. for i = 1, 0, -0.05 do
  1817. Player.Character[Name].Source.Transparency = i
  1818. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  1819. wait()
  1820. end
  1821. Player.Character[Name].Source.Transparency = 0
  1822. if Player.Character:FindFirstChild("Head") ~= nil then
  1823. if Player.Character.Head:FindFirstChild("face") ~= nil then
  1824. Player.Character.Head.face.Face = "Bottom"
  1825. end
  1826. end
  1827. Player.Character[Name].Handle.Shine.Looped = false
  1828. Player.Character[Name].Handle.Shine.Volume = 1
  1829. Player.Character[Name].Handle.Shine:Play()
  1830. for i = 0, 1.1, 0.01 do
  1831. Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
  1832. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
  1833. for _, children in pairs(Player.Character:GetChildren()) do
  1834. if children.ClassName == "Part" and children.Name ~= "" then
  1835. children.Transparency = i
  1836. end
  1837. if children.Name == Name then
  1838. for _, children2 in pairs(children:GetChildren()) do
  1839. if children2.ClassName == "Part" then
  1840. children2.Transparency = i
  1841. end
  1842. end
  1843. end
  1844. end
  1845. wait()
  1846. end
  1847. while Button1Down == true do
  1848. if Player.Character == nil then break end
  1849. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1850. if Player.Character.Humanoid.Health <= 0 then break end
  1851. if Player.Character:FindFirstChild(Name) == nil then break end
  1852. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1853. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1854. if power <= 0 then break end
  1855. power = power - 1
  1856. wait(0.5)
  1857. end
  1858. Player.Character[Name].Handle.Shine:Play()
  1859. for i = 1, -0.1, -0.01 do
  1860. Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
  1861. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
  1862. for _, children in pairs(Player.Character:GetChildren()) do
  1863. if children.ClassName == "Part" and children.Name ~= "" then
  1864. children.Transparency = i
  1865. end
  1866. if children.Name == Name then
  1867. for _, children2 in pairs(children:GetChildren()) do
  1868. if children2.ClassName == "Part" then
  1869. children2.Transparency = i
  1870. end
  1871. end
  1872. end
  1873. end
  1874. wait()
  1875. end
  1876. Player.Character[Name].Handle.Shine:Stop()
  1877. if Player.Character:FindFirstChild("Head") ~= nil then
  1878. if Player.Character.Head:FindFirstChild("face") ~= nil then
  1879. Player.Character.Head.face.Face = "Front"
  1880. end
  1881. end
  1882. for i = 0, 1, 0.05 do
  1883. Player.Character[Name].Source.Transparency = i
  1884. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  1885. wait()
  1886. end
  1887. Player.Character[Name].Source.Transparency = 1
  1888. canFire = true
  1889. elseif spell == 15 then
  1890. --Duraen Control, human manipulation class. Lets you control the movements of others.
  1891. Controlling = Controlling == nil and false or Controlling
  1892. ControlModel = ControlModel == nil and nil or ControlModel
  1893. if Controlling ~= true then
  1894. if mouse.Target == nil then return end
  1895. if mouse.Target.Parent == nil then return end
  1896. if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
  1897. if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
  1898. if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
  1899. canFire = false
  1900. Controlling = true
  1901. ControlModel = mouse.Target.Parent
  1902. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1903. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1904. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  1905. Player.Character[Name].Handle.Shine.Looped = false
  1906. Player.Character[Name].Handle.Shine.Volume = 1
  1907. Player.Character[Name].Handle.Shine.Pitch = 2
  1908. Player.Character[Name].Handle.Shine:Play()
  1909. for i = 1, 0, -0.025 do
  1910. Player.Character[Name].Source.Transparency = i
  1911. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  1912. Player.Character[Name].Handle.Shine.Pitch = i * 2
  1913. wait()
  1914. end
  1915. Player.Character[Name].Source.Transparency = 0
  1916. Player.Character[Name].Handle.Shine:Stop()
  1917. coroutine.resume(coroutine.create(function()
  1918. for i = 0, 1, 0.05 do
  1919. Player.Character[Name].Source.Transparency = i
  1920. wait()
  1921. end
  1922. Player.Character[Name].Source.Transparency = 1
  1923. end))
  1924. Player.Character[Name].Handle.Fire2.Looped = false
  1925. Player.Character[Name].Handle.Fire2.Volume = 1
  1926. Player.Character[Name].Handle.Fire2.Pitch = 1
  1927. Player.Character[Name].Handle.Fire2:Play()
  1928. local Shot = Instance.new("Part", Workspace)
  1929. Shot.FormFactor = "Custom"
  1930. Shot.Shape = "Ball"
  1931. Shot.Size = Vector3.new(1, 1, 1)
  1932. Shot.CFrame = Player.Character[Name].Source.CFrame
  1933. Shot.CanCollide = false
  1934. Shot.BrickColor = BrickColor.new("Neon orange")
  1935. Shot.Transparency = 0.5
  1936. Shot.TopSurface = 0
  1937. Shot.BottomSurface = 0
  1938. local BodyVelocity = Instance.new("BodyVelocity", Shot)
  1939. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1940. local Camera = Workspace.CurrentCamera
  1941. Camera.CameraSubject = Shot
  1942. while true do
  1943. if ControlModel == nil then break end
  1944. if ControlModel.Parent == nil then break end
  1945. if ControlModel:FindFirstChild("Humanoid") == nil then break end
  1946. if ControlModel.Humanoid.Health <= 0 then break end
  1947. if ControlModel:FindFirstChild("Torso") == nil then break end
  1948. if ControlModel:FindFirstChild("Head") == nil then break end
  1949. if Player.Character == nil then break end
  1950. if Player.Character.Parent == nil then break end
  1951. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1952. if Player.Character.Humanoid.Health <= 0 then break end
  1953. if Player.Character:FindFirstChild("Torso") == nil then break end
  1954. if Player.Character:FindFirstChild("Head") == nil then break end
  1955. if Shot.Parent == nil then break end
  1956. if (ControlModel.Head.Position - Shot.Position).magnitude < 3 then break end
  1957. BodyVelocity.velocity = (ControlModel.Head.Position - Shot.Position).unit * (ControlModel.Humanoid.WalkSpeed * 1.5)
  1958. wait()
  1959. end
  1960. Shot:Remove()
  1961. if ControlModel:FindFirstChild("Humanoid") == nil then return end
  1962. if ControlModel:FindFirstChild("Torso") == nil then return end
  1963. if ControlModel:FindFirstChild("Head") == nil then return end
  1964. local ControlPlayer = nil
  1965. local Explosion = Instance.new("Part", Workspace)
  1966. Explosion.FormFactor = "Custom"
  1967. Explosion.Shape = "Ball"
  1968. Explosion.Size = Vector3.new(1, 1, 1)
  1969. Explosion.CFrame = ControlModel.Head.CFrame
  1970. Explosion.CanCollide = false
  1971. Explosion.Anchored = true
  1972. Explosion.BrickColor = BrickColor.new("Neon orange")
  1973. Explosion.Transparency = 0.5
  1974. Explosion.TopSurface = 0
  1975. Explosion.BottomSurface = 0
  1976. local Mesh = Instance.new("SpecialMesh")
  1977. Mesh.MeshType = "Sphere"
  1978. Mesh.Parent = Explosion
  1979. coroutine.resume(coroutine.create(function(Part)
  1980. for i = 0, 1, 0.05 do
  1981. Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
  1982. Explosion.Transparency = i
  1983. Explosion.CFrame = Part.CFrame
  1984. wait()
  1985. end
  1986. Explosion:Remove()
  1987. end), ControlModel.Head)
  1988. local Camera = Workspace.CurrentCamera
  1989. Camera.CameraSubject = ControlModel.Humanoid
  1990. canFire = true
  1991. while Controlling == true and ControlModel:FindFirstChild("Humanoid") ~= nil and ControlModel:FindFirstChild("Torso") ~= nil and ControlModel:FindFirstChild("Head") ~= nil and spell == 15 and selected == true do
  1992. if Player.Character == nil then break end
  1993. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1994. if Player.Character.Humanoid.Health <= 0 then break end
  1995. if Player.Character:FindFirstChild(Name) == nil then break end
  1996. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1997. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1998. if ControlModel.Humanoid.Health <= 0 then break end
  1999. if power <= 0 then break end
  2000. if math.random(1, 2) == 1 then power = power - 1 end
  2001. ControlModel.Humanoid:MoveTo(mouse.Hit.p, mouse.Target == nil and ControlModel.Torso or mouse.Target)
  2002. if mouse.Hit.p.y > ControlModel.Torso.Position.y then
  2003. ControlModel.Humanoid.Jump = true
  2004. end
  2005. wait()
  2006. end
  2007. if ControlModel.Parent ~= nil then
  2008. if ControlModel:FindFirstChild("Head") ~= nil then
  2009. local Explosion = Instance.new("Part", Workspace)
  2010. Explosion.Name = "Magical Explosion"
  2011. Explosion.FormFactor = "Custom"
  2012. Explosion.Shape = "Ball"
  2013. Explosion.Size = Vector3.new(1, 1, 1)
  2014. Explosion.CFrame = ControlModel.Head.CFrame
  2015. Explosion.CanCollide = false
  2016. Explosion.Anchored = true
  2017. Explosion.BrickColor = BrickColor.new("Neon orange")
  2018. Explosion.TopSurface = 0
  2019. Explosion.BottomSurface = 0
  2020. local Mesh = Instance.new("SpecialMesh")
  2021. Mesh.MeshType = "Sphere"
  2022. Mesh.Parent = Explosion
  2023. coroutine.resume(coroutine.create(function(Part)
  2024. for i = 1, 0, -0.05 do
  2025. Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
  2026. Explosion.Transparency = i
  2027. Explosion.CFrame = Part.CFrame
  2028. wait()
  2029. end
  2030. Explosion:Remove()
  2031. end), ControlModel.Head)
  2032. end
  2033. end
  2034. Controlling = false
  2035. ControlModel = nil
  2036. Camera.CameraSubject = Player.Character:FindFirstChild("Humanoid")
  2037. canFire = false
  2038. if selected == true then
  2039. for i = 1, 0, -0.05 do
  2040. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2041. Player.Character[Name].Source.Mesh.Scale = Vector3.new(2, 2, 2)
  2042. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2043. Player.Character[Name].Source.Transparency = i
  2044. wait()
  2045. end
  2046. Player.Character[Name].Handle.Shine.Looped = false
  2047. Player.Character[Name].Handle.Shine.Volume = 1
  2048. Player.Character[Name].Handle.Shine.Pitch = 0
  2049. Player.Character[Name].Handle.Shine:Play()
  2050. for i = 0, 1, 0.025 do
  2051. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2052. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2053. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2054. Player.Character[Name].Source.Transparency = i
  2055. Player.Character[Name].Handle.Shine.Pitch = i * 2
  2056. wait()
  2057. end
  2058. Player.Character[Name].Source.Transparency = 1
  2059. end
  2060. canFire = true
  2061. else
  2062. Controlling = false
  2063. end
  2064. elseif spell == 16 then
  2065. --Duraen Switch, human manipulation class. Dress up as the enemy... Or as a woman, you sicko.
  2066. if mouse.Target == nil then return end
  2067. if mouse.Target.Parent == nil then return end
  2068. if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
  2069. if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
  2070. if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
  2071. canFire = false
  2072. local CharacterOne = Player.Character
  2073. local CharacterTwo = mouse.Target.Parent
  2074. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2075. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  2076. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2077. Player.Character[Name].Handle.Shine.Looped = false
  2078. Player.Character[Name].Handle.Shine.Volume = 1
  2079. Player.Character[Name].Handle.Shine.Pitch = 2
  2080. Player.Character[Name].Handle.Shine:Play()
  2081. for i = 1, 0, -0.025 do
  2082. Player.Character[Name].Source.Transparency = i
  2083. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2084. Player.Character[Name].Handle.Shine.Pitch = i * 2
  2085. wait()
  2086. end
  2087. Player.Character[Name].Source.Transparency = 0
  2088. Player.Character[Name].Handle.Shine:Stop()
  2089. coroutine.resume(coroutine.create(function()
  2090. for i = 0, 1, 0.05 do
  2091. Player.Character[Name].Source.Transparency = i
  2092. wait()
  2093. end
  2094. Player.Character[Name].Source.Transparency = 1
  2095. end))
  2096. coroutine.resume(coroutine.create(function()
  2097. local Explosion = Instance.new("Part", Workspace)
  2098. Explosion.Name = "Magical Explosion"
  2099. Explosion.FormFactor = "Custom"
  2100. Explosion.Shape = "Ball"
  2101. Explosion.Size = Vector3.new(1, 1, 1)
  2102. Explosion.CanCollide = false
  2103. Explosion.Anchored = true
  2104. Explosion.BrickColor = BrickColor.new("Neon orange")
  2105. Explosion.TopSurface = 0
  2106. Explosion.BottomSurface = 0
  2107. local Mesh = Instance.new("SpecialMesh")
  2108. Mesh.MeshType = "Sphere"
  2109. Mesh.Parent = Explosion
  2110. coroutine.resume(coroutine.create(function(Part)
  2111. for i = 0, 7, 0.1 do
  2112. Mesh.Scale = Vector3.new(i, i * 2, i)
  2113. Explosion.CFrame = Part.CFrame
  2114. wait()
  2115. end
  2116. for i = 7, 14, 0.1 do
  2117. Mesh.Scale = Vector3.new(i, i * 2, i)
  2118. Explosion.Transparency = (i - 7) / 7
  2119. Explosion.CFrame = Part.CFrame
  2120. wait()
  2121. end
  2122. Explosion:Remove()
  2123. end), CharacterOne.Torso)
  2124. local Explosion = Instance.new("Part", Workspace)
  2125. Explosion.Name = "Magical Explosion"
  2126. Explosion.FormFactor = "Custom"
  2127. Explosion.Shape = "Ball"
  2128. Explosion.Size = Vector3.new(1, 1, 1)
  2129. Explosion.CanCollide = false
  2130. Explosion.Anchored = true
  2131. Explosion.BrickColor = BrickColor.new("Neon orange")
  2132. Explosion.TopSurface = 0
  2133. Explosion.BottomSurface = 0
  2134. local Mesh = Instance.new("SpecialMesh")
  2135. Mesh.MeshType = "Sphere"
  2136. Mesh.Parent = Explosion
  2137. coroutine.resume(coroutine.create(function(Part)
  2138. for i = 0, 7, 0.1 do
  2139. Mesh.Scale = Vector3.new(i, i * 2, i)
  2140. Explosion.CFrame = Part.CFrame
  2141. wait()
  2142. end
  2143. for i = 7, 14, 0.1 do
  2144. Mesh.Scale = Vector3.new(i, i * 2, i)
  2145. Explosion.Transparency = (i - 7) / 7
  2146. Explosion.CFrame = Part.CFrame
  2147. wait()
  2148. end
  2149. Explosion:Remove()
  2150. end), CharacterTwo.Torso)
  2151. end))
  2152. wait(2)
  2153. local CharacterOneParts = Instance.new("Model")
  2154. local CharacterTwoParts = Instance.new("Model")
  2155. if CharacterOne.Head:FindFirstChild("face") ~= nil then
  2156. CharacterOne.Head.face.Parent = CharacterOneParts
  2157. end
  2158. if CharacterOne.Head:FindFirstChild("Mesh") ~= nil then
  2159. CharacterOne.Head.Mesh.Parent = CharacterOneParts
  2160. end
  2161. if CharacterOne.Torso:FindFirstChild("roblox") ~= nil then
  2162. CharacterOne.Torso.roblox.Parent = CharacterOneParts
  2163. end
  2164. for _, Part in pairs(CharacterOne:GetChildren()) do
  2165. if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
  2166. Part.Parent = CharacterOneParts
  2167. end
  2168. end
  2169. if CharacterTwo.Head:FindFirstChild("face") ~= nil then
  2170. CharacterTwo.Head.face.Parent = CharacterTwoParts
  2171. end
  2172. if CharacterTwo.Head:FindFirstChild("Mesh") ~= nil then
  2173. CharacterTwo.Head.Mesh.Parent = CharacterTwoParts
  2174. end
  2175. if CharacterTwo.Torso:FindFirstChild("roblox") ~= nil then
  2176. CharacterTwo.Torso.roblox.Parent = CharacterTwoParts
  2177. end
  2178. for _, Part in pairs(CharacterTwo:GetChildren()) do
  2179. if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
  2180. Part.Parent = CharacterTwoParts
  2181. end
  2182. end
  2183. for _, Part in pairs(CharacterOneParts:GetChildren()) do
  2184. if Part.Name == "face" or Part.Name == "Mesh" then
  2185. Part.Parent = CharacterTwo.Head
  2186. elseif Part.Name == "roblox" then
  2187. Part.Parent = CharacterTwo.Torso
  2188. else
  2189. Part.Parent = CharacterTwo
  2190. end
  2191. end
  2192. for _, Part in pairs(CharacterTwoParts:GetChildren()) do
  2193. if Part.Name == "face" or Part.Name == "Mesh" then
  2194. Part.Parent = CharacterOne.Head
  2195. elseif Part.Name == "roblox" then
  2196. Part.Parent = CharacterOne.Torso
  2197. else
  2198. Part.Parent = CharacterOne
  2199. end
  2200. end
  2201. canFire = true
  2202. end
  2203. end
  2204.  
  2205.  
  2206. function onButton1Up(mouse)
  2207. if selected == false then return end
  2208. Button1Down = false
  2209. while canFire == false do wait() end
  2210. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  2211. end
  2212.  
  2213.  
  2214. function onKeyDown(key, mouse)
  2215. if selected == false or canFire == false or Button1Down == true then return end
  2216. key = key:lower()
  2217. if key == "q" then
  2218. if mouse.Target == nil then return end
  2219. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  2220. onDeselected(mouse)
  2221. removeParts("holster")
  2222. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  2223. end
  2224. end
  2225. if key == "e" then
  2226. spell = spell - 1
  2227. if spell < 0 then
  2228. spell = 16
  2229. end
  2230. end
  2231. if key == "r" then
  2232. spell = spell + 1
  2233. if spell > 16 then
  2234. spell = 0
  2235. end
  2236. end
  2237. if key == "t" then
  2238. spellHotkey1Delay = time()
  2239. end
  2240. if key == "y" then
  2241. spellHotkey2Delay = time()
  2242. end
  2243. if key == "u" then
  2244. spellHotkey3Delay = time()
  2245. end
  2246. updateSpellText()
  2247. updateGui()
  2248. end
  2249.  
  2250.  
  2251. function onKeyUp(key, mouse)
  2252. if selected == false or canFire == false or Button1Down == true then return end
  2253. key = key:lower()
  2254. if key == "t" then
  2255. if time() - spellHotkey1Delay > 1 then
  2256. spellHotkey1 = spell
  2257. local HotkeyMessage = Instance.new("Message", Player)
  2258. HotkeyMessage.Text = "Set hotkey 1."
  2259. wait(2.5)
  2260. HotkeyMessage:Remove()
  2261. else
  2262. spell = spellHotkey1
  2263. end
  2264. end
  2265. if key == "y" then
  2266. if time() - spellHotkey2Delay > 1 then
  2267. spellHotkey2 = spell
  2268. local HotkeyMessage = Instance.new("Message", Player)
  2269. HotkeyMessage.Text = "Set hotkey 2."
  2270. wait(2.5)
  2271. HotkeyMessage:Remove()
  2272. else
  2273. spell = spellHotkey2
  2274. end
  2275. end
  2276. if key == "u" then
  2277. if time() - spellHotkey3Delay > 1 then
  2278. spellHotkey3 = spell
  2279. local HotkeyMessage = Instance.new("Message", Player)
  2280. HotkeyMessage.Text = "Set hotkey 3."
  2281. wait(2.5)
  2282. HotkeyMessage:Remove()
  2283. else
  2284. spell = spellHotkey3
  2285. end
  2286. end
  2287. updateSpellText()
  2288. updateGui()
  2289. end
  2290.  
  2291.  
  2292. function onSelected(mouse)
  2293. if selected == true or dropped == true then return end
  2294. selected = true
  2295. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  2296. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2297. if Player.Character.WeaponActivated.Value == nil then break end
  2298. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  2299. wait()
  2300. end
  2301. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  2302. updateSpellText()
  2303. updateGui()
  2304. removeParts("holster")
  2305. makeParts("hand")
  2306. local weapon = Instance.new("ObjectValue")
  2307. weapon.Name = "WeaponActivated"
  2308. weapon.Value = script.Parent
  2309. weapon.Parent = Player.Character
  2310. DisableLimb(1, Player.Character)
  2311. SetAngle(1, math.rad(90), Player.Character)
  2312. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  2313. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  2314. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  2315. mouse.KeyUp:connect(function(key) onKeyUp(key, mouse) end)
  2316. while selected == true do
  2317. if canFire == true then
  2318. if power < 100 and power >= 0 then
  2319. power = power + 1
  2320. wait(0.05)
  2321. elseif power < 0 then
  2322. power = power + 1
  2323. wait(0.3)
  2324. elseif power > 100 then
  2325. power = power - 1
  2326. wait(1)
  2327. else
  2328. power = 100
  2329. end
  2330. end
  2331. updateSpellText()
  2332. updateGui()
  2333. wait()
  2334. end
  2335. end
  2336.  
  2337.  
  2338. function onDeselected(mouse)
  2339. if selected == false then return end
  2340. selected = false
  2341. Button1Down = false
  2342. while canFire == false do
  2343. wait()
  2344. end
  2345. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  2346. if Player.Character.WeaponActivated.Value == script.Parent then
  2347. Player.Character.WeaponActivated:Remove()
  2348. end
  2349. end
  2350. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2351. if Player.Character.WeaponActivated.Value == nil then break end
  2352. if pcall(function() if Player.Character.WeaponActivated.Value.Parent == nil then return true end end) then break end
  2353. wait()
  2354. end
  2355. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  2356. removeParts("hand")
  2357. makeParts("holster")
  2358. SetAngle(1, 0, Player.Character)
  2359. EnableLimb(1, Player.Character)
  2360. end
  2361.  
  2362.  
  2363. if script.Parent.ClassName ~= "HopperBin" then
  2364. if Player == nil then print("Error: Player not found!") return end
  2365. local Tool = Instance.new("HopperBin")
  2366. Tool.Name = Name
  2367. Tool.Parent = Player.Backpack
  2368. script.Name = "Main"
  2369. script.Parent = Tool
  2370. elseif script.Parent.ClassName == "HopperBin" then
  2371. while script.Parent.Parent.ClassName ~= "Backpack" do
  2372. wait()
  2373. end
  2374. Player = script.Parent.Parent.Parent
  2375. makeParts("holster")
  2376. script.Parent.Selected:connect(onSelected)
  2377. script.Parent.Deselected:connect(onDeselected)
  2378. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement