Advertisement
Guest User

magnitude stuffs

a guest
Feb 16th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1.  
  2. spawn(function()
  3. while fireball.Parent == workspace do
  4. while wait(.01) do
  5. for _,v in pairs(workspace:GetChildren()) do
  6. if v.Name == "kamehamehaBall" then
  7. local clashPart2 = v:FindFirstChild("part3")
  8. if clashPart2 and clashPart2 ~= part3 then
  9. local magnitude = (part3.Position - clashPart2.Position).magnitude
  10. if magnitude <3 then
  11. print("in range")
  12. local canClash2 = v:FindFirstChild("canClash")
  13. if canClash2 and canClash2.Value == true then
  14. if not v:FindFirstChild("isClashing") and clashing == false then
  15. print("able to clash")
  16. local plr2Val = v:FindFirstChild("clashParent")
  17. if plr2Val and plr2Val.Value ~= nil and plr2Val.Value ~= plr then
  18. local plr2 = plr2Val.Value
  19. local isClash1 = Instance.new("BoolValue",plr2.Character)
  20. isClash1.Name = "isClashing"
  21. isClash1.Value = true
  22. isClash1:Clone().Parent = char
  23. --clashing = true
  24. print(plr.Name.." is clashing with "..plr2.Name)
  25.  
  26.  
  27.  
  28. local beam1 = fireball.bigBeam
  29. local beam2 = fireball.smallBeam
  30. local part3 = fireball.part3
  31. local part4 = fireball.part4
  32. local beam3 = v.bigBeam
  33. local beam4 = v.smallBeam
  34. local part5 = v.part3
  35. local part6 = v.part4
  36.  
  37.  
  38. end
  39. end
  40. end
  41. end
  42. end
  43. end
  44. end
  45. end
  46. end
  47. end)
  48.  
  49.  
  50. char.ChildAdded:Connect(function(child)
  51. if child.Name == "isClashing" then
  52. clashing = true
  53. end
  54. end)
  55. char.ChildRemoved:Connect(function(child)
  56. if child.Name == "isClashing" then
  57. clashing = false
  58. end
  59. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement