Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.56 KB | None | 0 0
  1. local menu = script.Parent:WaitForChild("Menu")
  2. local healthEnergy = menu:WaitForChild("HealthEnergy")
  3. local energy = healthEnergy:WaitForChild("Energy")
  4. local health = healthEnergy:WaitForChild("Health")
  5. local slideFrame = menu:WaitForChild("SlideInFrame")
  6. local statsFrame = slideFrame:WaitForChild("Stats")
  7. local events = game:GetService("ReplicatedStorage"):WaitForChild("Events")
  8. local saveEvent = events:WaitForChild("Saved")
  9. local shuttingDown = events:WaitForChild("ShuttingDown")
  10. local saveButton = menu:WaitForChild("Save")
  11. local input = script.Parent.Parent:WaitForChild("InputHandler")
  12. local service = game:GetService("UserInputService")
  13. local transformed = script.Parent:WaitForChild("Transformed")
  14. local kaio = input:WaitForChild("Kaioken")
  15. local ssj1 = input:WaitForChild("SuperSaiyan")
  16. local ssj2 = input:WaitForChild("SuperSaiyan2")
  17. local lssj = input:WaitForChild("LegendSaiyan")
  18. local ssj3 = input:WaitForChild("SuperSaiyan3")
  19. local myst = input:WaitForChild("Mystic")
  20. local ssj4 = input:WaitForChild("SuperSaiyan4")
  21. local ssjg = input:WaitForChild("SuperSaiyanG")
  22. local ssjb = input:WaitForChild("SuperSaiyanB")
  23. local godf = input:WaitForChild("FriezaGod")
  24. local ssjw = input:WaitForChild("SuperSaiyanWhite")
  25. local ssjp = input:WaitForChild("SuperSaiyanPink")
  26. local supr = input:WaitForChild("Supreme")
  27. local udss = input:WaitForChild("Undead")
  28. local anss = input:WaitForChild("Angel")
  29. local lssg = input:WaitForChild("LSSJG")
  30. local omeg = input:WaitForChild("Omega")
  31. local ssj5 = input:WaitForChild("SSJ5")
  32. local ssb3 = input:WaitForChild("SuperSaiyanB3")
  33. local musics = {
  34. {
  35. 194135434,
  36. "Vegeta's Rage"
  37. },
  38. {316770138, "Buu Theme"},
  39. {253181651, "Destiny"},
  40. {253913148, "Braveheart"},
  41. {
  42. 156056027,
  43. "Gohan Vs Frieza"
  44. },
  45. {
  46. 253002550,
  47. "A Moment for Shuddering"
  48. },
  49. {
  50. 253920031,
  51. "A Mighty Foe"
  52. },
  53. {185436863, "Wild Soul"},
  54. {
  55. 156017783,
  56. "Piccolo vs Andriod 17"
  57. },
  58. {
  59. 171199543,
  60. "Power of a God"
  61. },
  62. {
  63. 581552293,
  64. "Head Cha-la remix"
  65. }
  66. }
  67. local sound = Instance.new("Sound", script)
  68. sound.Volume = 0.75
  69. sound.Looped = true
  70. local musicId = musics[math.random(1, #musics)]
  71. sound.SoundId = "rbxassetid://" .. musicId[1]
  72. sound:Play()
  73. local music = slideFrame:WaitForChild("Music")
  74. music:WaitForChild("Toggle").MouseButton1Click:connect(function()
  75. if sound.Volume == 0 then
  76. sound.Volume = 0.75
  77. else
  78. sound.Volume = 0
  79. end
  80. end)
  81. local musicScrolling = music:WaitForChild("ScrollingFrame")
  82. for i, v in pairs(musics) do
  83. do
  84. local button = musicScrolling:WaitForChild("Example"):Clone()
  85. button.Name = "Button" .. i
  86. button.Text = v[2]
  87. button.Parent = musicScrolling
  88. button.Visible = true
  89. button.Position = UDim2.new(0, 0, 0, 30 * (i - 1))
  90. musicScrolling.CanvasSize = UDim2.new(0, 0, 0, 30 * #musics)
  91. button.MouseButton1Click:connect(function()
  92. sound.Looped = false
  93. wait()
  94. sound:Stop()
  95. sound.SoundId = "rbxassetid://" .. v[1]
  96. sound.Looped = true
  97. sound:Play()
  98. end)
  99. end
  100. end
  101. local player = game.Players.LocalPlayer
  102. repeat
  103. wait()
  104. until player.Character
  105. local character = player.Character
  106. local humanoid = character:WaitForChild("Humanoid")
  107. local stats = player:WaitForChild("Data")
  108. player.PlayerGui:SetTopbarTransparency(0)
  109. local ki, maxKi = script.Parent:WaitForChild("Ki"), script.Parent:WaitForChild("MaxKi")
  110. local function updateKi()
  111. energy.Max.Value = maxKi.Value
  112. energy.Current.Value = ki.Value
  113. end
  114. ki.Changed:connect(updateKi)
  115. maxKi.Changed:connect(updateKi)
  116. updateKi()
  117. humanoid.HealthChanged:connect(function()
  118. health.Max.Value = humanoid.MaxHealth
  119. health.Current.Value = humanoid.Health
  120. end)
  121. local function updateStats(v)
  122. if statsFrame:FindFirstChild(v.Name) then
  123. stats.Power.Value = stats.Attack.Value / 1000
  124. stats.Energy.Value = stats.Ki.Value / 1000
  125. stats.Defense.Value = math.floor((stats.Attack.Value + stats.Agility.Value) / 2)
  126. for _, v in pairs(stats:GetChildren()) do
  127. if v.Value < 0 then
  128. v.Value = 0
  129. end
  130. end
  131. humanoid.MaxHealth = stats.Defense.Value / 5000 + 100
  132. if kaio.Value then
  133. humanoid.MaxHealth = stats.Defense.Value / 5000 + 140
  134. end
  135. if ssj1.Value then
  136. humanoid.MaxHealth = stats.Defense.Value / 5000 + 180
  137. end
  138. if ssj2.Value then
  139. humanoid.MaxHealth = stats.Defense.Value / 5000 + 220
  140. end
  141. if lssj.Value then
  142. humanoid.MaxHealth = stats.Defense.Value / 5000 + 260
  143. end
  144. if ssj3.Value then
  145. humanoid.MaxHealth = stats.Defense.Value / 5000 + 300
  146. end
  147. if myst.Value then
  148. humanoid.MaxHealth = stats.Defense.Value / 5000 + 340
  149. end
  150. if ssj4.Value then
  151. humanoid.MaxHealth = stats.Defense.Value / 5000 + 380
  152. end
  153. if ssjg.Value then
  154. humanoid.MaxHealth = stats.Defense.Value / 5000 + 420
  155. end
  156. if ssjb.Value then
  157. humanoid.MaxHealth = stats.Defense.Value / 5000 + 460
  158. end
  159. if godf.Value then
  160. humanoid.MaxHealth = stats.Defense.Value / 5000 + 500
  161. end
  162. if ssjw.Value then
  163. humanoid.MaxHealth = stats.Defense.Value / 5000 + 540
  164. end
  165. if ssjp.Value then
  166. humanoid.MaxHealth = stats.Defense.Value / 5000 + 580
  167. end
  168. if ssj5.Value then
  169. humanoid.MaxHealth = stats.Defense.Value / 5000 + 400
  170. end
  171. if omeg.Value then
  172. humanoid.MaxHealth = stats.Defense.Value / 5000 + 290
  173. end
  174. if lssg.Value then
  175. humanoid.MaxHealth = stats.Defense.Value / 5000 + 480
  176. end
  177. if udss.Value then
  178. humanoid.MaxHealth = stats.Defense.Value / 5000 + 360
  179. end
  180. if anss.Value then
  181. humanoid.MaxHealth = stats.Defense.Value / 5000 + 600
  182. end
  183. if ssb3.Value then
  184. humanoid.MaxHealth = stats.Defense.Value / 5000 + 1300
  185. end
  186. maxKi.Value = math.floor(stats.Ki.Value / 10000) + 100
  187. if anss.Value then
  188. maxKi.Value = maxKi.Value * 1.5
  189. elseif ssb3.Value then
  190. maxKi.Value = maxKi.Value * 2
  191. end
  192. stats.PowerLevel.Value = math.floor(stats.Attack.Value / 3 + stats.Agility.Value / 3 + stats.Ki.Value / 3)
  193. statsFrame[v.Name].Text = v.Name .. ": " .. v.Value
  194. statsFrame.Defense.Text = "Defense: " .. math.floor((stats.Attack.Value + stats.Agility.Value) / 2)
  195. end
  196. end
  197. updateStats(stats:WaitForChild("Attack"))
  198. humanoid.Health = humanoid.MaxHealth
  199. for _, v in pairs(stats:GetChildren()) do
  200. v.Changed:connect(function()
  201. updateStats(v)
  202. end)
  203. updateStats(v)
  204. end
  205. anss.Changed:connect(function()
  206. if anss.Value == false then
  207. ki.Value = math.floor(stats.Ki.Value / 10000) + 100
  208. end
  209. end)
  210. ssb3.Changed:connect(function()
  211. if ssb3.Value == false then
  212. ki.Value = math.floor(stats.Ki.Value / 10000) + 100
  213. end
  214. end)
  215. transformed.Event:connect(function()
  216. updateStats(stats.Ki)
  217. print(2)
  218. health.Max.Value = humanoid.MaxHealth
  219. health.Current.Value = humanoid.Health
  220. end)
  221. local saved = false
  222. saveButton.MouseButton1Click:connect(function()
  223. if saved then
  224. return
  225. end
  226. saved = true
  227. saveEvent:FireServer()
  228. saveButton.Text = ""
  229. for i = 60, 1, -1 do
  230. saveButton.Text = i .. " "
  231. wait(1)
  232. end
  233. saveButton.Text = "Save "
  234. saved = true
  235. end)
  236. saveEvent.OnClientEvent:connect(function()
  237. saveButton.Saved.Value = true
  238. end)
  239. if shuttingDown.Value == true then
  240. script.Parent.Alert.Visible = true
  241. else
  242. script.Parent.Alert.Visible = false
  243. end
  244. shuttingDown.Changed:connect(function()
  245. if shuttingDown.Value == true then
  246. script.Parent.Alert.Visible = true
  247. else
  248. script.Parent.Alert.Visible = false
  249. end
  250. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement