REDPlays

JoJo Part 10 Scripts

Jan 20th, 2020
18,558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. --// Arrow Script
  2.  
  3. local Arrow = script.Parent
  4. local Click = Arrow:WaitForChild("Click")
  5.  
  6. Click.MouseClick:Connect(function(player)
  7.  
  8. local Backpack = player:FindFirstChild("Backpack")
  9.  
  10. local randomStand = math.random(1,3) --1 to the number of stands you have
  11.  
  12. if Backpack then
  13. if randomStand == 1 then
  14. local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
  15.  
  16. --//If stand is summoned
  17. local prevStand = workspace:FindFirstChild(player.Name.." Stand")
  18. if prevStand then
  19. prevStand:Destroy()
  20. end
  21.  
  22. for i, v in pairs(Backpack:GetChildren()) do
  23. if v:IsA("Folder") then
  24. local StandSummon = v:FindFirstChild("StandSummon")
  25. if StandSummon then
  26. v:Destroy()
  27. end
  28. end
  29. end
  30.  
  31. --//Stand will be given
  32. local Stand = Stands:FindFirstChild("Star"):Clone()
  33. Stand.Parent = Backpack
  34.  
  35. Arrow:Destroy()
  36. elseif randomStand == 2 then
  37. local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
  38.  
  39. --//If stand is summoned
  40. local prevStand = workspace:FindFirstChild(player.Name.." Stand")
  41. if prevStand then
  42. prevStand:Destroy()
  43. end
  44.  
  45. for i, v in pairs(Backpack:GetChildren()) do
  46. if v:IsA("Folder") then
  47. local StandSummon = v:FindFirstChild("StandSummon")
  48. if StandSummon then
  49. v:Destroy()
  50. end
  51. end
  52. end
  53.  
  54. --//Stand will be given
  55. local Stand = Stands:FindFirstChild("Stand1"):Clone()
  56. Stand.Parent = Backpack
  57.  
  58. Arrow:Destroy()
  59. elseif randomStand == 3 then
  60. local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
  61.  
  62. --//If stand is summoned
  63. local prevStand = workspace:FindFirstChild(player.Name.." Stand")
  64. if prevStand then
  65. prevStand:Destroy()
  66. end
  67.  
  68. for i, v in pairs(Backpack:GetChildren()) do
  69. if v:IsA("Folder") then
  70. local StandSummon = v:FindFirstChild("StandSummon")
  71. if StandSummon then
  72. v:Destroy()
  73. end
  74. end
  75. end
  76.  
  77. --//Stand will be given
  78. local Stand = Stands:FindFirstChild("Platinum"):Clone()
  79. Stand.Parent = Backpack
  80.  
  81. Arrow:Destroy()
  82. end
  83. end
  84. end)
  85.  
  86. --//Rokaka Fruit
  87.  
  88. local Fruit = script.Parent
  89.  
  90. local Click = Fruit:WaitForChild("Click")
  91.  
  92. Click.MouseClick:Connect(function(player)
  93. local Backpack = player:FindFirstChild("Backpack")
  94.  
  95. if Backpack then
  96. --//If stand is summoned
  97. local prevStand = workspace:FindFirstChild(player.Name.." Stand")
  98. if prevStand then
  99. prevStand:Destroy()
  100. end
  101.  
  102. --//Removes the Stand's Folder
  103. for i, v in pairs(Backpack:GetChildren()) do
  104. if v:IsA("Folder") then
  105. local StandSummon = v:FindFirstChild("StandSummon")
  106. if StandSummon then
  107. v:Destroy()
  108. end
  109. end
  110. end
  111.  
  112. Fruit:Destroy()
  113. end
  114.  
  115. end)
Advertisement
Add Comment
Please, Sign In to add comment