Advertisement
iiJosephCats205

Charging Fireball

Nov 4th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.55 KB | None | 0 0
  1. --By iiJoeCats
  2.  
  3. --//BO NOT EDIT WHAT IS UNDER THIS UNLESS YOU KNOW WHAT YOUR DOING\\--
  4. repeat wait(1) until game.Players.LocalPlayer
  5. print("Running...")
  6.  
  7. local player = game.Players.LocalPlayer
  8. local mouse = player:GetMouse()
  9. local UIS = game:GetService("UserInputService")
  10. local character = player.Character
  11. local run = game:GetService("RunService")
  12. local TweenS = game:GetService("TweenService")
  13. local runS = run.RenderStepped
  14.  
  15. local charging = false
  16. local value = 0
  17. local attack = false
  18.  
  19. function removeItem(item,timer)
  20.     game:GetService("Debris"):AddItem(item,timer)
  21. end
  22.  
  23. local hum = character:FindFirstChildOfClass("Humanoid")
  24.  
  25. hum.BreakJointsOnDeath = false
  26.  
  27. local rArm = character["Right Arm"]
  28. local lArm = character["Left Arm"]
  29. local rLeg = character["Right Leg"]
  30. local lLeg = character["Left Leg"]
  31. local tors = character.Torso
  32. local hed = character.Head
  33. local root = character.HumanoidRootPart
  34.  
  35. local rootj = root.RootJoint
  36.  
  37. local names = {
  38.     "oof",
  39.     "wow",
  40.     "OwO",
  41.     "memes",
  42.     "dedXD",
  43.     "baby-shark",
  44.     "wasted",
  45.     "whostoleyourmomscokeandjustgothigh",
  46.     "furry",
  47.     "iburryguts",
  48.     "fortnite",
  49.     "BOI",
  50.     "yodahitsthebooftoohardandfukingdiesXD"
  51. }
  52.  
  53. function morph()
  54.     local particlea = Instance.new("ParticleEmitter",rArm)
  55.     particlea.Speed = NumberRange.new(0.20000000298023, 0.25)
  56.     particlea.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 1, 0))
  57.     particlea.LightInfluence = 1
  58.     particlea.Texture = "rbxassetid://4112080010"
  59.     particlea.Size = NumberSequence.new(0.24999976158142,0.18750011920929)
  60.     particlea.Drag = -5
  61.     particlea.Lifetime = NumberRange.new(0.75, 0.85000002384186)
  62.     particlea.LockedToPart = true
  63.     particlea.Rate = 46
  64.    
  65.     local particleb = Instance.new("ParticleEmitter",lArm)
  66.     particleb.Speed = NumberRange.new(0.20000000298023, 0.25)
  67.     particleb.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 1, 0))
  68.     particleb.LightInfluence = 1
  69.     particleb.Texture = "rbxassetid://4112080010"
  70.     particleb.Size = NumberSequence.new(0.24999976158142,0.18750011920929)
  71.     particleb.Drag = -5
  72.     particleb.Lifetime = NumberRange.new(0.75, 0.85000002384186)
  73.     particleb.LockedToPart = true
  74.     particleb.Rate = 46
  75. end
  76.  
  77. ypcall(function()
  78.     morph()
  79. end)
  80.  
  81. hum.WalkSpeed = 25
  82.  
  83. mouse.KeyDown:Connect(function(key)
  84.     if not attack then
  85.         if key == "q" then
  86.             local dmg = 0
  87.             value = 0
  88.             charging = true
  89.             attack = true
  90.            
  91.             local raWeld = Instance.new("Weld",tors)
  92.             raWeld.Part0 = tors
  93.             raWeld.Part1 = rArm
  94.             raWeld.C0 = CFrame.new(1.5,0,0)
  95.            
  96.             local laWeld = Instance.new("Weld",tors)
  97.             laWeld.Part0 = tors
  98.             laWeld.Part1 = lArm
  99.             laWeld.C0 = CFrame.new(-1.5,0,0)
  100.            
  101.             for i = 0,1,0.2 do
  102.                 runS:wait()
  103.                 raWeld.C0 = raWeld.C0:lerp(CFrame.new(1.3,.5,-.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(0),math.rad(-20)),i)
  104.                 laWeld.C0 = laWeld.C0:lerp(CFrame.new(-1.3,.5,-.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(0),math.rad(20)),i)
  105.             end
  106.            
  107.             local posBox = Instance.new("Part",character)
  108.             posBox.Size = Vector3.new(1,1,1)
  109.             posBox.CanCollide = false
  110.             posBox.Transparency = 1
  111.            
  112.             local wld = Instance.new("Weld",posBox)
  113.             wld.Part0 = posBox
  114.             wld.Part1 = tors
  115.             wld.C0 = CFrame.new(0,-0.575,2.4)
  116.            
  117.             local f = Instance.new("Part",workspace)
  118.             f.Size = Vector3.new(3,3,3)
  119.             f.CanCollide = false
  120.             f.Anchored = true
  121.             f.Shape = Enum.PartType.Ball
  122.             f.Material = Enum.Material.Neon
  123.             f.BrickColor = BrickColor.new("Really red")
  124.             f.CFrame = posBox.CFrame
  125.            
  126.             local function getRidOf()
  127.                 spawn(function()
  128.                     removeItem(f,4.5)
  129.                     wait(4.5)
  130.                     touch:Disconnect()
  131.                 end)
  132.             end
  133.            
  134.             local function firePos()
  135.                 tors.Anchored = true
  136.                
  137.                 while charging do
  138.                     value = value + 1
  139.                     if value >= 250 then
  140.                         charging = false
  141.                         value = 0
  142.                     else   
  143.                         runS:wait()
  144.                         dmg = dmg + 0.25 / 2 * math.ceil(math.random(1,5))
  145.                         root.CFrame = CFrame.new(root.Position, mouse.Hit.p) * CFrame.new(0,0,0)
  146.                         wld.C0 = wld.C0 * CFrame.new(0,0,.04)
  147.                         f.CFrame = posBox.CFrame
  148.                         f.Size = f.Size + Vector3.new(0.07,0.07,0.07)
  149.                     end
  150.                 end
  151.                
  152.                 getRidOf()
  153.                 local velo = Instance.new("BodyVelocity",f)
  154.                 velo.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  155.                 velo.Velocity = f.CFrame.LookVector * 120
  156.                
  157.                 f.Anchored = false
  158.                 tors.Anchored = false
  159.                
  160.                 touch = f.Touched:Connect(function(hit)
  161.                     local humn = hit.Parent:FindFirstChildOfClass("Humanoid")
  162.                     if humn and humn.Health > 0 then
  163.                         if hit:IsDescendantOf(character) then return end
  164.                         local val = humn.Parent:FindFirstChildOfClass("BinaryStringValue")
  165.                         if not val then
  166.                             Instance.new("BinaryStringValue",humn.Parent).Name = names[math.random(1, #names)]
  167.                             humn:TakeDamage(dmg * 1.02)
  168.                             spawn(function()
  169.                                 for i = 1,10 do
  170.                                     --Effect
  171.                                     local prt = f:Clone()
  172.                                     prt.Parent = workspace
  173.                                     prt.Size = Vector3.new(0.5,0.5,0.5)
  174.                                     prt.CFrame = f.CFrame
  175.                                     prt:FindFirstChildOfClass("BodyVelocity").Velocity = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  176.                                     prt.CanCollide = false
  177.                                     removeItem(prt,0.75)
  178.                                    
  179.                                 end
  180.                             end)
  181.                             wait(2)
  182.                             humn.Parent:FindFirstChildOfClass("BinaryStringValue"):Destroy()
  183.                         else
  184.                             --nothing  
  185.                         end
  186.                     end
  187.                 end)
  188.                
  189.             end
  190.             firePos()
  191.            
  192.             wait(1)
  193.             raWeld:Destroy()
  194.             laWeld:Destroy()
  195.             attack = false
  196.         end
  197.     end
  198. end)
  199.  
  200. mouse.KeyUp:Connect(function(key)
  201.     if key == "q" and attack then
  202.         charging = false
  203.     end
  204. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement