Advertisement
EmeraldIT

Calculation HR. 0-12678

Apr 8th, 2023 (edited)
703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 24.19 KB | None | 0 0
  1. script:Destroy()
  2.  
  3. local pl = owner
  4. local ch = pl.Character
  5. local movementAdd = 0
  6. local speed = 0.13
  7. local enabled = false
  8. local sinespeed = 0.45
  9. local seg = 15
  10. local color = "Bright orange"
  11. local mylastp = nil
  12. local mat = "Neon"
  13. local ref = 0
  14. local trans = 0
  15. local shape = "Block"
  16. local mode = "gust"
  17. local AnimState
  18. local sprint = false
  19. local dodgechance = 10
  20. local dodging = false
  21. local lastc = ch.HumanoidRootPart.CFrame
  22. ------------CORE FUNCTIONS-------------
  23.  
  24. function make(inst, parent, details)
  25.     local Item = Instance.new(inst)
  26.     if details then
  27.         for i,v in pairs(details) do
  28.             Item[i] = v
  29.         end
  30.     end
  31.     Item.Parent = parent or nil
  32.     return Item
  33. end
  34.  
  35. local function randneg(num1, num2)
  36.     times = 1
  37.     if math.random(1,2) == 1 then
  38.         times = 1
  39.     else
  40.         times = -1
  41.     end
  42.     return math.random(num1, num2)*times
  43. end
  44.  
  45. function clone(part, col, aftersize, aftercol)
  46.     if not part:IsA("SpecialMesh") then
  47.         local p = make("Part", part, {Anchored = true, CanCollide = false, Shape = part.Shape, CFrame = part.CFrame, Material = "Neon", Name = "Clone piece", Color = col})
  48.         if part.Name ~= "Head" then
  49.             p.Size = part.Size + Vector3.new(.02,.02,.02)
  50.         else
  51.             p.Size = Vector3.new(1,1,1) + Vector3.new(.02,.02,.02)
  52.         end
  53.         spawn(function()
  54.             for i = 1,15 do
  55.                 p.Transparency = i/15
  56.                 if aftersize then
  57.                     p.Size = p.Size:Lerp(aftersize, 0.03)
  58.                 end
  59.                 if aftercol then
  60.                     p.Color = p.Color:Lerp(aftercol, 0.03)
  61.                 end
  62.                 task.wait()
  63.             end
  64.             p:Remove()
  65.         end)
  66.     else
  67.         local p = make("Part", part, {Anchored = true, CanCollide = false, CFrame = part.Parent.CFrame, Material = "Neon", Name = "Clone piece", Color = col})
  68.         if part.Parent.Name ~= "Head" then
  69.             p.Size = part.Parent.Size + Vector3.new(.02,.02,.02)
  70.         else
  71.             p.Size = Vector3.new(1,1,1) + Vector3.new(.02,.02,.02)
  72.         end
  73.         pm = make("SpecialMesh", p, {MeshType = "Sphere"})
  74.         spawn(function()
  75.             for i = 1,15 do
  76.                 p.Transparency = i/15
  77.                 if aftersize then
  78.                     p.Size = p.Size:Lerp(aftersize, 0.03)
  79.                 end
  80.                 if aftercol then
  81.                     p.Color = p.Color:Lerp(aftercol, 0.03)
  82.                 end
  83.                 task.wait()
  84.             end
  85.             p:Remove()
  86.         end)
  87.     end
  88. end
  89.  
  90.  
  91. if not game.Lighting:FindFirstChildOfClass("BloomEffect") then
  92.     local bloom = make("BloomEffect", game.Lighting, {Name = "Glow/Bloom"})
  93. end
  94.  
  95. local highlight
  96. local HoningAttacks
  97. local ev
  98. local pieces
  99. local boomPart
  100. local boomptBlack
  101. local boompt
  102.  
  103. function makeCharacter()
  104.  
  105. ch = owner.Character
  106. highlight = make("Highlight", ch, {Adornee = ch, DepthMode = "Occluded", FillTransparency = 1, OutlineColor = Color3.new(0,0,0)})
  107. HoningAttacks = Instance.new("Folder")
  108. HoningAttacks.Parent = owner.Character
  109. ev = Instance.new("RemoteEvent", pl.Character)
  110. ev.Name = "Ev"
  111. boomPart = make("Part", HoningAttacks, {Transparency = 1, Anchored = true, CanCollide = false, Size = Vector3.new(.01,.01,.01)})
  112. boomptBlack = make("ParticleEmitter", boomPart, {Texture = "rbxassetid://2273224484", SpreadAngle = Vector2.new(360, 360), Size = NumberSequence.new(20, 0), Transparency = NumberSequence.new(0--[[seq]]), LightEmission = -2, LightInfluence = 0, Lifetime = NumberRange.new(.3), Color = ColorSequence.new(Color3.new(0,0,0)), Speed = NumberRange.new(0), Drag = 20, RotSpeed = NumberRange.new(360), Enabled = false, Acceleration = Vector3.new(0, 0, 0)})
  113. boompt = make("ParticleEmitter", boomPart, {Texture = "rbxassetid://2273224484", SpreadAngle = Vector2.new(360, 360), Size = NumberSequence.new(18, 0), Transparency = NumberSequence.new(0--[[seq]]), LightEmission = 1, LightInfluence = 0, ZOffset= 2, Lifetime = NumberRange.new(.3), Color = ColorSequence.new(BrickColor.new(color).Color), Speed = NumberRange.new(0), Drag = 20, RotSpeed = NumberRange.new(360), Enabled = false, Acceleration = Vector3.new(0, 0, 0)})
  114. pieces = {}
  115.  
  116.  
  117. owner.Character.Humanoid.Died:Connect(function()
  118.     owner:LoadCharacter()
  119. end)
  120.  
  121. ----------------------NLS-----------------------------
  122.  
  123. local nls = [[
  124. local pl = game.Players.LocalPlayer
  125. local mouse = pl:GetMouse()
  126. local hold = false
  127. local ev = script.Parent:WaitForChild("Ev")
  128.  
  129. mouse.KeyDown:Connect(function(k)
  130.     if k == "q" then
  131.         hold = true
  132.         repeat
  133.             ev:FireServer("Missile")
  134.             wait(0.1)
  135.         until hold == false
  136.     elseif k == "z" then
  137.         ev:FireServer("SprintToggle")
  138.     elseif k == "e" then
  139.         ev:FireServer("Teleport", mouse.Hit.p + Vector3.new(0, 3, 0))
  140.     end
  141. end)
  142.  
  143. mouse.KeyUp:Connect(function(k)
  144.     if k == "q" then
  145.         hold = false
  146.     end
  147. end)
  148. ]]
  149.  
  150. NLS(nls, pl.Character)
  151. ev.OnServerEvent:Connect(function(_, cmd, ...)
  152.     if cmd == "SprintToggle" then
  153.         if sprint == false then
  154.             sprint = true
  155.             owner.Character.Humanoid.WalkSpeed = 60
  156.         elseif sprint == true then
  157.             sprint = false
  158.             owner.Character.Humanoid.WalkSpeed = 16
  159.         end
  160.     elseif cmd == "Teleport" then
  161.         clone(owner.Character.Torso, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  162.         clone(owner.Character.Head, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  163.         clone(owner.Character["Left Arm"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  164.         clone(owner.Character["Right Arm"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  165.         clone(owner.Character["Left Leg"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  166.         clone(owner.Character["Right Leg"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  167.         for _,v in pairs(pieces) do
  168.             clone(v, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  169.         end
  170.         owner.Character.HumanoidRootPart.Position = (...)  
  171.     else
  172.         missile(nil, pieces[math.random(1, #pieces)].CFrame)
  173.     end
  174. end)
  175.  
  176. ------------------TAIL------------------
  177.  
  178. local p = make("Part", owner.Character, {
  179.     Material = mat or "Neon",
  180.     Transparency = trans or 0,
  181.     Reflectance = ref or 0,
  182.     BrickColor = BrickColor.new(Color),
  183.     CanCollide = false, Shape = Enum.PartType[shape] or "Block", Size = Vector3.new(1,1,1), Anchored = true})
  184. local fire = make("Fire", p, {Size = 1, Heat = 3, Enabled = enabled or false, Name = "F"})
  185. local originalSize = make("Vector3Value", p, {Name = "OriginalSize", Value = p.Size})
  186. table.insert(pieces, p)
  187.  
  188. local sine = 0
  189.  
  190. game:GetService("RunService").Stepped:Connect(function()
  191.     pcall(function()
  192.         sine = sine + 1
  193.         p.BrickColor = BrickColor.new(color)
  194.         p.Shape = Enum.PartType[shape] or "Block"
  195.         p.Material = mat
  196.         p.Transparency = trans
  197.         p.Reflectance = ref
  198.         if p:FindFirstChild("F") then p.F.Color = BrickColor.new(color).Color p.F.SecondaryColor = BrickColor.new(color).Color end
  199.         if p:FindFirstChild("F") then p.F.Enabled = enabled end
  200.         if AnimState == "idle" then
  201.             p.Size = p.Size:Lerp(p.OriginalSize.Value, 0.2)
  202.             p.CFrame = p.CFrame:Lerp(ch.Torso.CFrame* CFrame.new(0 + 0.1*math.cos(sine/(sinespeed*100)),-0.5 + 0.1*math.cos(sine/(sinespeed*50)),0.5), speed + movementAdd)
  203.         else
  204.             p.Size = p.Size:Lerp(Vector3.new(1 - 0.25*math.sin(sine/50), 1 - 0.25*math.sin(sine/50), 1 - 0.25*math.sin(sine/50)), 0.2)
  205.             p.CFrame = p.CFrame:Lerp(ch.Torso.CFrame * CFrame.new(0, -1, 2) * CFrame.Angles(0, 0, math.rad(-(sine*10))) * CFrame.new(0, 5 + 1*math.sin(sine/50), 0), 0.2)
  206.         end
  207.     end)
  208. end)
  209.  
  210. local mylastp = p
  211. local a = 1
  212. for i = 1,seg do
  213.     spawn(function()
  214.         local sine = 0
  215.        
  216.         local p = make("Part", owner.Character, {
  217.             Material = mat or "Neon",
  218.             Transparency = trans or 0,
  219.             Reflectance = ref or 0,
  220.             BrickColor = BrickColor.new(Color),
  221.             CanCollide = false, Shape = Enum.PartType[shape] or "Block", Size = Vector3.new(1- i/20,1-i/20,1-i/20), Anchored = true, Name = "tailpart"..i})
  222.         local fire = make("Fire", p, {Size = 1, Heat = 3, Enabled = enabled or false, Name = "F"})
  223.         local originalSize = make("Vector3Value", p, {Name = "OriginalSize", Value = p.Size})
  224.         table.insert(pieces, p)
  225.  
  226.         local setl = mylastp
  227.         v = Instance.new("IntValue", p)
  228.         v.Value = i
  229.         spawn(function()
  230.             b = 0 + a
  231.             local tmode = "Normal"
  232.             local dedicatedRand = math.random(20,40)
  233.             spawn(function()
  234.                 wait(dedicatedRand)
  235.                 while true do
  236.                     if tmode == "Normal" then
  237.                         tmode = "Diff1"
  238.                         dedicatedRand = 20
  239.                         wait(dedicatedRand)
  240.                     else
  241.                         tmode = "Normal"
  242.                         dedicatedRand = math.random(20,40)
  243.                         wait(dedicatedRand)
  244.                     end
  245.                 end
  246.             end)
  247.             game:GetService("RunService").Stepped:Connect(function()
  248.                 pcall(function()
  249.                     sine = sine + 1
  250.                     p.Shape = Enum.PartType[shape] or "Block"
  251.                     p.Transparency = trans
  252.                     p.Reflectance = ref
  253.                     p.Material = mat
  254.                     p.BrickColor = BrickColor.new(color)
  255.                     if p:FindFirstChild("F") then p.F.Color = BrickColor.new(color).Color p.F.SecondaryColor = BrickColor.new(color).Color end
  256.                     if p:FindFirstChild("F") then p.F.Enabled = enabled end
  257.                     if AnimState == "idle" then
  258.                         p.Size = p.Size:Lerp(p.OriginalSize.Value, 0.2)
  259.                         if tmode == "Normal" then
  260.                             p.CFrame = p.CFrame:Lerp(setl.CFrame* CFrame.new(0 + (0.5)*math.cos(sine/(sinespeed*100)),0 + 0.5*math.cos(sine/(sinespeed*50)),(setl.Size.Y/3)*2), speed + movementAdd)
  261.                         else
  262.                             p.CFrame = p.CFrame:Lerp(setl.CFrame* CFrame.new(0 + (0.5)*math.cos(sine/(sinespeed*100)),0 + 0.5*math.cos(sine/(sinespeed*50)),(setl.Size.Y/3)*2) * CFrame.Angles(0, 0, math.rad(i)), speed + movementAdd)* CFrame.Angles(0, 0, math.rad(1))
  263.                         end
  264.                     else
  265.                         p.Size = p.Size:Lerp(Vector3.new(1 - 0.25*math.sin(sine/50), 1 - 0.25*math.sin(sine/50), 1 - 0.25*math.sin(sine/50)), 0.2)
  266.                         p.CFrame = p.CFrame:Lerp(ch.Torso.CFrame * CFrame.new(0, -1, 2) * CFrame.Angles(0, 0, math.rad((360/(seg+1))*i-(sine*10))) * CFrame.new(0, 5 + 1*math.sin(sine/50), 0), 0.2)
  267.                     end
  268.                 end)
  269.             end)
  270.         end)
  271.         mylastp = p
  272.     end)
  273.     a = a + 1
  274. end
  275.  
  276. -----------------AUTO DODGE AND BLOCKING-----------------
  277.  
  278. local prevHealth = owner.Character.Humanoid.MaxHealth
  279. owner.Character.Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
  280.     pcall(function()
  281.     if math.random(100/dodgechance) == 1 then
  282.         if owner.Character.Humanoid.Health > prevHealth then
  283.             prevHealth = owner.Character.Humanoid.Health
  284.             return
  285.         end
  286.         prevHealth = owner.Character.Humanoid.Health
  287.         local HealthLoss = (owner.Character.Humanoid.MaxHealth - math.round(owner.Character.Humanoid.Health))
  288.         owner.Character.Humanoid:TakeDamage(-HealthLoss)
  289.    
  290.         clone(owner.Character.Torso, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  291.         clone(owner.Character.Head, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  292.         clone(owner.Character["Left Arm"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  293.         clone(owner.Character["Right Arm"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  294.         clone(owner.Character["Left Leg"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  295.         clone(owner.Character["Right Leg"], BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  296.         for _,v in pairs(pieces) do
  297.             clone(v, BrickColor.new(color).Color, Vector3.new(0,0,0), Color3.new(0,1,.3))
  298.         end
  299.         owner.Character.HumanoidRootPart.Position = owner.Character.HumanoidRootPart.Position + Vector3.new(randneg(5, 10), 0, randneg(5, 10))
  300.    
  301.         print("Dodged "..HealthLoss.." points worth of health! ("..dodgechance.."% chance.)")
  302.     end
  303.     end)
  304. end)
  305. if owner.Character:FindFirstChild("Animator",true) then
  306.     owner.Character:FindFirstChild("Animator",true):Destroy()
  307. end
  308. if owner.Character:FindFirstChild("Animate",true) then
  309.     owner.Character:FindFirstChild("Animate",true):Destroy()
  310. end
  311. ch.HumanoidRootPart.CFrame = lastc * CFrame.new(0, 3, 0)
  312.  
  313. end --makecharacter()
  314.  
  315. ---------------ANIMATIONS---------------
  316.  
  317. --Thank you to bathtub (PlayVoider) and Scandalous for this C0 animation handler base.
  318.  
  319. local hmmm = {["idle"] = function(Sine)
  320.     return {
  321.     ["RootJoint"] = CFrame.new(0, 0, 2 + 1*math.sin(Sine/40)) * CFrame.Angles(math.rad(-15*math.sin((Sine-40)/40)), math.rad(0), math.rad(0)),
  322.     ["Neck"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(15*math.sin((Sine-40)/40)), math.rad(0), math.rad(0)),
  323.     ["Left Shoulder"] = CFrame.new(0, 0.3*math.sin((Sine-40)/40), 0) * CFrame.Angles(-math.rad(15 + 30*math.sin((Sine-40)/40)), math.rad(0), math.rad(15*math.sin((Sine-40)/40))),
  324.     ["Right Shoulder"] = CFrame.new(0, 0.3*math.sin((Sine-40)/40), 0) * CFrame.Angles(-math.rad(15 + 30*math.sin((Sine-40)/40)), math.rad(0), math.rad(-15*math.sin((Sine-40)/40))),
  325.     ["Left Hip"] = CFrame.new(-0.7, 0.7, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-20 * math.sin((Sine-40)/40))),
  326.     ["Right Hip"] = CFrame.new(0.3, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-40 * math.sin((Sine-30)/40)))}
  327. end,
  328. ["run"] = function(Sine)
  329.     return {
  330.     ["RootJoint"] = CFrame.new(0, 0, 2 + 1*math.sin(Sine/40)) * CFrame.Angles(math.rad(45 + 15*math.sin((Sine-40)/40)), math.rad(0), math.rad(0)),
  331.     ["Neck"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-45 - 15*math.sin((Sine-40)/40)), math.rad(0), math.rad(0)),
  332.     ["Left Shoulder"] = CFrame.new(0, 0-0.3*math.sin((Sine-40)/40), 0) * CFrame.Angles(-math.rad(16 + 15*math.sin((Sine-40)/40)), math.rad(0), math.rad(15*math.sin((Sine-40)/40))),
  333.     ["Right Shoulder"] = CFrame.new(0, 0-0.3*math.sin((Sine-40)/40), 0) * CFrame.Angles(-math.rad(16 + 15*math.sin((Sine-40)/40)), math.rad(0), math.rad(-15*math.sin((Sine-40)/40))),
  334.     ["Left Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(30 + 10 * math.sin((Sine-30)/40))),
  335.     ["Right Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-40 -10 * math.sin((Sine-30)/40)))}
  336. end,
  337. ["jump"] = function(Sine)
  338.     return {--X Z Y
  339.     ["RootJoint"] = CFrame.new(0, 0, 2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  340.     ["Neck"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  341.     ["Left Shoulder"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  342.     ["Right Shoulder"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  343.     ["Left Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  344.     ["Right Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))}
  345. end,
  346. ["sit"] = function(Sine)
  347.     return {--X Z Y
  348.     ["RootJoint"] = CFrame.new(0, 0, 2) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  349.     ["Neck"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  350.     ["Left Shoulder"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  351.     ["Right Shoulder"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  352.     ["Left Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),
  353.     ["Right Hip"] = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))}
  354. end,
  355. }
  356. local tablee = {}
  357. for i,v in owner.Character:GetDescendants() do
  358.     if v:IsA('Motor6D') then
  359.         tablee[v.Name] = v.C0
  360.     end
  361. end
  362. if owner.Character:FindFirstChild('Animator',true) then
  363.     owner.Character:FindFirstChild('Animator',true):Destroy()
  364. end
  365. local AnimSine = 1
  366.  
  367. game:GetService("RunService").Heartbeat:Connect(function()
  368.     pcall(function()
  369.         local RootPart = owner.Character.HumanoidRootPart
  370.         if owner.Character.Humanoid:GetState() == "Sitting" then
  371.             AnimState = "sit"
  372.         else
  373.             if math.abs((RootPart.Velocity*Vector3.new(0,1,0)).Magnitude)>1 then
  374.                 AnimState = "jump"
  375.                 movementAdd = 0.3
  376.             elseif math.abs((RootPart.Velocity*Vector3.new(1,0,1)).Magnitude)>1 then
  377.                 AnimState = "run"
  378.                 movementAdd = 0.3
  379.             else
  380.                 AnimState = "idle"
  381.                 movementAdd = 0
  382.             end
  383.         end
  384.         table.foreach(hmmm[AnimState](AnimSine),function(funny, moment)
  385.             owner.Character:FindFirstChild(funny, true).C0=owner.Character:FindFirstChild(funny,true).C0:Lerp(tablee[funny]*moment,0.3)
  386.         end)
  387.         AnimSine = AnimSine + 1
  388.     end)
  389. end)
  390.  
  391.  
  392. -----------------ATTACK 1, Honing Magic------------------
  393.  
  394. local nearest = nil
  395.  
  396. function boom(pos, amount, range)
  397.     if not boomPart then
  398.         boomPart = make("Part", HoningAttacks, {Transparency = 1, Anchored = true, CanCollide = false, Size = Vector3.new(.01,.01,.01)})
  399.  
  400.         seq = {NumberSequenceKeypoint.new(0, 0)}
  401.         for i = 1, 14 do
  402.             seq[i+1] = NumberSequenceKeypoint.new(i/14, 1 * math.random(0, 1))
  403.         end
  404.  
  405.         boomptBlack = make("ParticleEmitter", boomPart, {Texture = "rbxassetid://2273224484", SpreadAngle = Vector2.new(360, 360), Size = NumberSequence.new(20, 0), Transparency = NumberSequence.new(0--[[seq]]), LightEmission = -2, LightInfluence = 0, Lifetime = NumberRange.new(.3), Color = ColorSequence.new(Color3.new(0,0,0)), Speed = NumberRange.new(0), Drag = 20, RotSpeed = NumberRange.new(360), Enabled = false, Acceleration = Vector3.new(0, 0, 0)})
  406.         boompt = make("ParticleEmitter", boomPart, {Texture = "rbxassetid://2273224484", SpreadAngle = Vector2.new(360, 360), Size = NumberSequence.new(18, 0), Transparency = NumberSequence.new(0--[[seq]]), LightEmission = 1, LightInfluence = 0, ZOffset= 2, Lifetime = NumberRange.new(.3), Color = ColorSequence.new(BrickColor.new(color).Color), Speed = NumberRange.new(0), Drag = 20, RotSpeed = NumberRange.new(360), Enabled = false, Acceleration = Vector3.new(0, 0, 0)})
  407.     end
  408.     boomptBlack.Size = NumberSequence.new(20 + ((function() if range then return range/100 else return nil end end)() or 0), 0)
  409.     boompt.Color = ColorSequence.new(BrickColor.new(color).Color)
  410.     boompt.Size = NumberSequence.new(18 + ((function() if range then return range/100 else return nil end end)() or 0), 0)
  411.  
  412.     boomPart.Position = pos
  413.     boomptBlack:Emit(1)
  414.     boompt:Emit(1)
  415. end
  416.  
  417. function effect(hit, dmg, crit)
  418.     if not hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent:FindFirstChildOfClass("Humanoid").Health <= 0 then return end
  419.     local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  420.     if mode == "gust" then
  421.         if crit then
  422.             hum.Health = hum.Health - dmg
  423.             if hum.Health <= 0 then
  424.                 print("Killer hit! Crit point increased! (Now "..dodgechance.."%)")
  425.                 dodgechance = math.clamp(dodgechance+math.random(1,2), 0, 100)
  426.             end
  427.         else
  428.             hum:TakeDamage(dmg)
  429.             if hum.Health <= 0 then
  430.                 print("Killer hit! Crit point increased! (Now "..dodgechance.."%)")
  431.                 dodgechance = math.clamp(dodgechance+math.random(1,2), 0, 100)
  432.             end
  433.         end
  434.         hit.Anchored = false
  435.         local bv = make("BodyVelocity", hit, {MaxForce = Vector3.new(1e9, 1e9, 1e9), Velocity = Vector3.new(math.random(-10, 10), math.random(10, 20), math.random(-10, 10)) * 3})
  436.         game:GetService("Debris"):AddItem(bv, 0.1)
  437.     end
  438. end
  439.  
  440. function region3Effect(place, range, crit)
  441.     spawn(function()
  442.         local reg = Region3.new((place * CFrame.new(-range/2, -range/2, -range/2)).p, (place * CFrame.new(range/2, range/2, range/2)).p)
  443.        
  444.         yes = workspace:FindPartsInRegion3WithIgnoreList(reg, {owner.Character, workspace.Base}, 5)
  445.         for _,v in pairs(yes) do
  446.             if crit then
  447.                 effect(v, 5, crit)
  448.             else
  449.                 effect(v, 2)
  450.             end
  451.         end
  452.     end)
  453. end
  454.  
  455. function missile(col, origin)
  456.     if nearest == nil or nearest.Parent == nil then return end
  457.     local r = game:service("RunService")
  458.     local chosenCol = nil
  459.     local crit = false
  460.     if math.random(100/dodgechance) == 1 then
  461.         chosenCol = Color3.new(0,0,0)
  462.         crit = true
  463.     else
  464.         chosenCol = BrickColor.new(color).Color
  465.     end
  466.     local shaft = make("Part", nil, {Size = Vector3.new(1, 1, 1), Shape = Enum.PartType[shape] or "Block", CanCollide = false, Material = "Neon", Color = chosenCol, CFrame = (origin or pl.Character.HumanoidRootPart.CFrame or CFrame.new(math.random(-1000, 1000), math.random(0, 1000), math.random(-1000, 1000))) * CFrame.Angles(0, 0, math.rad(90)) * CFrame.Angles(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360))), Transparency = 0})
  467.     local bg = make("BodyGyro", shaft, {D = 200, P = 1500, MaxTorque = Vector3.new(0,0,0)})
  468.     local position = shaft.Position
  469.     local direction = nil
  470.     local connection = nil
  471.  
  472.     local count = 1
  473.     local blow = function(hit)
  474.         local pos = shaft.Position
  475.         if hit:IsDescendantOf(HoningAttacks) or hit:IsDescendantOf(pl.Character) then
  476.             return
  477.         elseif hit.Name == "Base" and count < 3 then
  478.             count = count + 1
  479.             return
  480.         end
  481.         if math.random(100/dodgechance) == 1 then
  482.             region3Effect(shaft.CFrame, 100, true)
  483.         else
  484.             region3Effect(shaft.CFrame, 100, false)
  485.         end
  486.         shaft.Anchored = true
  487.         boom(shaft.Position)
  488.         shaft:Remove()
  489.         blow = nil
  490.         connection:disconnect()
  491.     end
  492.     shaft.Parent = HoningAttacks
  493.     local att = Instance.new("Attachment")
  494.     att.Position = Vector3.new(0, 0.4, 0)
  495.     local att2 = Instance.new("Attachment")
  496.     att2.Position = Vector3.new(0, -0.4, 0)
  497.     local trail = Instance.new("Trail")
  498.     trail.Color = ColorSequence.new(shaft.Color, (function()
  499.         if shaft.Color == Color3.new(0,0,0) then
  500.             return BrickColor.new(color).Color
  501.         else
  502.             return Color3.new(1,1,1)
  503.         end
  504.     end)())
  505.     trail.Lifetime = 0.5
  506.     trail.FaceCamera = true
  507.     trail.LightInfluence = 0
  508.     trail.LightEmission = (function()
  509.         _,_,v = shaft.Color:ToHSV()
  510.         return v/2
  511.     end)()
  512.     trail.WidthScale = NumberSequence.new(1, 0)
  513.     trail.Transparency = NumberSequence.new(0, 1)
  514.     trail.Attachment0 = att
  515.     trail.Attachment1 = att2
  516.     trail.Enabled = true
  517.     att.Parent = shaft
  518.     att2.Parent = shaft
  519.     trail.Parent = shaft
  520.  
  521.     game:GetService("Debris"):AddItem(shaft,10)
  522.    
  523.     spawn(function()
  524.         repeat
  525.             if shaft:IsDescendantOf(workspace) then
  526.                 if nearest == nil or nearest.Parent == nil then return end
  527.                 bg.MaxTorque = Vector3.new(20000,20000,20000)
  528.                 bg.D = bg.D - 1
  529.                 bg.P = bg.P + 7.5
  530.                 bg.CFrame = CFrame.new(shaft.Position, nearest.Position)
  531.                 if crit then
  532.     --              clone(shaft, shaft.Color, Vector3.new(0,0,0), BrickColor.new(color).Color)
  533.                 else
  534.     --              clone(shaft, shaft.Color, Vector3.new(0,0,0), Color3.new(1,1,1))
  535.                 end
  536.                 direction = shaft.CFrame.lookVector * 5
  537.                 position = position  + direction
  538.                 local err = position - shaft.Position
  539.                 shaft.Velocity = 5*err
  540.             end
  541.             r.Stepped:wait()
  542.         until not shaft:IsDescendantOf(workspace)
  543.         blow(Instance.new("Humanoid"))
  544.     end)
  545.  
  546.     connection = shaft.Touched:Connect(blow)
  547.    
  548. end
  549.  
  550. game:GetService("RunService").Stepped:Connect(function()
  551.     pcall(function()
  552.         lastc = owner.Character.HumanoidRootPart.CFrame
  553.     end)
  554.     pcall(function()
  555.         for _,v in pairs(game.Workspace:GetDescendants()) do
  556.             if v:IsA("Humanoid") and v.Parent ~= pl.Character and v.Health > 0 then
  557.                 if not nearest or nearest == nil then
  558.                     nearest = v.Parent:FindFirstChildOfClass("Part")
  559.                 elseif nearest then
  560.                     if (nearest.Position - pl.Character.HumanoidRootPart.Position).Magnitude > (v.Parent:FindFirstChildOfClass("Part").Position - pl.Character.HumanoidRootPart.Position).Magnitude then
  561.                         nearest = v.Parent:FindFirstChildOfClass("Part")
  562.                     end
  563.                 end
  564.             end
  565.         end
  566.     end)
  567. end)
  568.  
  569. ---------------CHAT CMDS------------------------
  570.  
  571. owner.Chatted:Connect(function(cha)
  572.     if string.sub(cha, 1, 6) == "color/" then
  573.         color = string.sub(cha, 7)
  574.     elseif string.sub(cha, 1, 6) == "shape/" then
  575.         shape = string.sub(cha, 7)
  576.     elseif string.sub(cha, 1, 4) == "mat/" then
  577.         mat = string.sub(cha, 5)
  578.     elseif string.sub(cha, 1, 8) == "reflect/" then
  579.         ref = tonumber(string.sub(cha, 9))
  580.         print(ref)
  581.     elseif string.sub(cha, 1, 6) == "trans/" then
  582.         trans = tonumber(string.sub(cha, 7))
  583.         print(trans)
  584.     elseif string.sub(cha, 1, 5) == "fire/" then
  585.         if string.sub(cha, 6) == "true" then enabled = true elseif string.sub(cha, 6) == "false" then enabled = false end
  586.     end
  587. end)
  588.  
  589. print([[
  590. Made by PhoenixClockworks
  591.  
  592. Moves:
  593. ~> Homing attack:
  594.     - Key: Q (Holdable)
  595.     - Damage: 2 per hit.
  596.     - Crit Damage: 5 per hit.
  597.     - Desc: Will automatically track people nearest to your character.
  598.     - Can crit: Yes. Critical missiles will be black.
  599. ~> Dodge:
  600.     - Key: (None) Passive
  601.     - Desc: % Chance of auto dodge when damaged.
  602. ~> Teleportation:
  603.     - Key: E
  604.     - Desc: Teleports you to the mouse
  605. ~> Sprint:
  606.     - Key: Z (Toggleable)
  607.     - Desc: Speeds you up.
  608.  
  609. Customization:
  610. ~> Change shape:
  611.     - shape/{'Ball' or 'Block' or 'Cylinder' (Ball or Block are recommended)}
  612. ~> Change color:
  613.     - color/{A brick color here (e.g. Lime green)}
  614. ~> Change material:
  615.     - mat/{a material (e.g Neon)}
  616. ~> Change reflectance:
  617.     - reflect/{a decimal number below 1 (and above 0, or 0. e.g 0.3)}
  618. ~> Change transparency:
  619.     - trans/{a decimal number below 1 (and above 0, or 0. e.g 0.3)}
  620. ~> Turn fire on or off:
  621.     - fire/{true (on) or false (off)}
  622.  
  623. Global chance % starts at 10, increases by 1-2 with every kill
  624. ]])
  625.  
  626. owner.CharacterAdded:Connect(makeCharacter)
  627. owner:LoadCharacter()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement