Advertisement
memberhero

test

Mar 21st, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.91 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. StringValue1 = Instance.new("StringValue")
  21. Folder2 = Instance.new("Folder")
  22. NumberValue3 = Instance.new("NumberValue")
  23. LocalScript4 = Instance.new("LocalScript")
  24. NumberValue5 = Instance.new("NumberValue")
  25. LocalScript6 = Instance.new("LocalScript")
  26. NumberValue7 = Instance.new("NumberValue")
  27. LocalScript8 = Instance.new("LocalScript")
  28. ScreenGui9 = Instance.new("ScreenGui")
  29. Frame10 = Instance.new("Frame")
  30. TextLabel11 = Instance.new("TextLabel")
  31. LocalScript12 = Instance.new("LocalScript")
  32. TextLabel13 = Instance.new("TextLabel")
  33. LocalScript14 = Instance.new("LocalScript")
  34. TextLabel15 = Instance.new("TextLabel")
  35. LocalScript16 = Instance.new("LocalScript")
  36. LocalScript17 = Instance.new("LocalScript")
  37. Folder18 = Instance.new("Folder")
  38. Folder19 = Instance.new("Folder")
  39. Tool0.Name = "BaseWeapon"
  40. Tool0.Parent = mas
  41. Tool0.TextureId = "http://www.roblox.com/asset/?id=7673024"
  42. Tool0.ToolTip = "[Tool]"
  43. Tool0.CanBeDropped = false
  44. StringValue1.Name = "WeaponType"
  45. StringValue1.Parent = Tool0
  46. StringValue1.Value = "NaN"
  47. Folder2.Name = "Stats"
  48. Folder2.Parent = Tool0
  49. NumberValue3.Name = "Defense"
  50. NumberValue3.Parent = Folder2
  51. NumberValue3.Value = 1
  52. LocalScript4.Parent = NumberValue3
  53. LocalScript4.Disabled = true
  54. table.insert(cors,sandbox(LocalScript4,function()
  55. local val = script.Parent
  56. local plr = game.Players.LocalPlayer
  57. local char = workspace:WaitForChild(plr.Name)
  58. local hum = char:WaitForChild("Humanoid")
  59.  
  60. while true do
  61. val.Value = char.Defense.Value
  62. wait()
  63. end
  64. end))
  65. NumberValue5.Name = "Power"
  66. NumberValue5.Parent = Folder2
  67. LocalScript6.Parent = NumberValue5
  68. LocalScript6.Disabled = true
  69. table.insert(cors,sandbox(LocalScript6,function()
  70. local val = script.Parent
  71. local plr = game.Players.LocalPlayer
  72. local char = workspace:WaitForChild(plr.Name)
  73. local hum = char:WaitForChild("Humanoid")
  74.  
  75. while true do
  76. val.Value = char.Power.Value
  77. wait()
  78. end
  79. end))
  80. NumberValue7.Name = "Speed"
  81. NumberValue7.Parent = Folder2
  82. LocalScript8.Parent = NumberValue7
  83. LocalScript8.Disabled = true
  84. table.insert(cors,sandbox(LocalScript8,function()
  85. local val = script.Parent
  86. local plr = game.Players.LocalPlayer
  87. local char = workspace:WaitForChild(plr.Name)
  88. local hum = char:WaitForChild("Humanoid")
  89.  
  90. while true do
  91. val.Value = math.floor(hum.WalkSpeed/16*10)/10
  92. wait()
  93. end
  94. end))
  95. ScreenGui9.Name = "StatGui"
  96. ScreenGui9.Parent = Tool0
  97. Frame10.Name = "Stats"
  98. Frame10.Parent = ScreenGui9
  99. Frame10.Size = UDim2.new(0.150000006, 1, 0.150000006, 1)
  100. Frame10.Style = Enum.FrameStyle.RobloxRound
  101. Frame10.Position = UDim2.new(0.845000029, 0, 0.845000029, 0)
  102. Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
  103. Frame10.BorderSizePixel = 0
  104. TextLabel11.Name = "Power"
  105. TextLabel11.Parent = Frame10
  106. TextLabel11.Size = UDim2.new(0.333000004, 1, 1, 1)
  107. TextLabel11.Text = "Pow:(#)"
  108. TextLabel11.BackgroundColor3 = Color3.new(1, 0.333333, 0)
  109. TextLabel11.BorderSizePixel = 0
  110. TextLabel11.Font = Enum.Font.ArialBold
  111. TextLabel11.FontSize = Enum.FontSize.Size14
  112. TextLabel11.TextColor3 = Color3.new(1, 1, 1)
  113. TextLabel11.TextScaled = true
  114. TextLabel11.TextStrokeTransparency = 0
  115. TextLabel11.TextWrapped = true
  116. LocalScript12.Parent = TextLabel11
  117. table.insert(cors,sandbox(LocalScript12,function()
  118. local tg = script.Parent
  119. local plr = game.Players.LocalPlayer
  120. local char = workspace:WaitForChild(plr.Name)
  121. local hum = char:WaitForChild("Humanoid")
  122.  
  123. while true do
  124. tg.Text = ("Pow:("..tostring(char:WaitForChild("BaseWeapon").Stats.Power.Value)..")")
  125. wait()
  126. end
  127.  
  128. end))
  129. TextLabel13.Name = "Defense"
  130. TextLabel13.Parent = Frame10
  131. TextLabel13.Size = UDim2.new(0.333000004, 1, 1, 1)
  132. TextLabel13.Text = "Def:(#)"
  133. TextLabel13.Position = UDim2.new(0.333000004, 0, 0, 0)
  134. TextLabel13.BackgroundColor3 = Color3.new(0, 0.666667, 1)
  135. TextLabel13.BorderSizePixel = 0
  136. TextLabel13.Font = Enum.Font.ArialBold
  137. TextLabel13.FontSize = Enum.FontSize.Size14
  138. TextLabel13.TextColor3 = Color3.new(1, 1, 1)
  139. TextLabel13.TextScaled = true
  140. TextLabel13.TextStrokeTransparency = 0
  141. TextLabel13.TextWrapped = true
  142. LocalScript14.Parent = TextLabel13
  143. table.insert(cors,sandbox(LocalScript14,function()
  144. local tg = script.Parent
  145. local plr = game.Players.LocalPlayer
  146. local char = workspace:WaitForChild(plr.Name)
  147. local hum = char:WaitForChild("Humanoid")
  148.  
  149. while true do
  150. tg.Text = ("Def:("..tostring(char:WaitForChild("BaseWeapon").Stats.Defense.Value)..")")
  151. wait()
  152. end
  153.  
  154. end))
  155. TextLabel15.Name = "Speed"
  156. TextLabel15.Parent = Frame10
  157. TextLabel15.Size = UDim2.new(0.333000004, 1, 1, 1)
  158. TextLabel15.Text = "Spd:(#)"
  159. TextLabel15.Position = UDim2.new(0.666000009, 0, 0, 0)
  160. TextLabel15.BackgroundColor3 = Color3.new(1, 1, 0)
  161. TextLabel15.BorderSizePixel = 0
  162. TextLabel15.Font = Enum.Font.ArialBold
  163. TextLabel15.FontSize = Enum.FontSize.Size14
  164. TextLabel15.TextColor3 = Color3.new(1, 1, 1)
  165. TextLabel15.TextScaled = true
  166. TextLabel15.TextStrokeTransparency = 0
  167. TextLabel15.TextWrapped = true
  168. LocalScript16.Parent = TextLabel15
  169. table.insert(cors,sandbox(LocalScript16,function()
  170. local tg = script.Parent
  171. local plr = game.Players.LocalPlayer
  172. local char = workspace:WaitForChild(plr.Name)
  173. local hum = char:WaitForChild("Humanoid")
  174.  
  175. while true do
  176. tg.Text = ("Spd:("..tostring(char:WaitForChild("BaseWeapon").Stats.Speed.Value)..")")
  177. wait()
  178. end
  179.  
  180.  
  181. end))
  182. LocalScript17.Name = "ToolScript"
  183. LocalScript17.Parent = Tool0
  184. table.insert(cors,sandbox(LocalScript17,function()
  185. local tool = script.Parent
  186. local plr = game.Players.LocalPlayer
  187. local char = workspace:WaitForChild(plr.Name)
  188. local hum = char:WaitForChild("Humanoid")
  189.  
  190. function Equipped()
  191. print('Equipped')
  192. local gooey = tool.StatGui:Clone()
  193. gooey.Parent = plr.PlayerGui
  194.  
  195. tool.Stats.Power.LocalScript.Disabled = false
  196. tool.Stats.Defense.LocalScript.Disabled = false
  197. tool.Stats.Speed.LocalScript.Disabled = false
  198.  
  199. end
  200.  
  201. function UnEquipped()
  202. print('UnEquipped')
  203.  
  204. plr.PlayerGui.StatGui:Destroy()
  205.  
  206. tool.Stats.Power.LocalScript.Disabled = true
  207. tool.Stats.Defense.LocalScript.Disabled = true
  208. tool.Stats.Speed.LocalScript.Disabled = true
  209.  
  210. end
  211.  
  212. function Activated()
  213. print('Activated')
  214. end
  215.  
  216. function UnActivated()
  217. print('UnActivated')
  218. end
  219.  
  220. tool.Equipped:connect(Equipped)
  221. tool.Unequipped:connect(UnEquipped)
  222. tool.Activated:connect(Activated)
  223. tool.Deactivated:connect(UnActivated)
  224. end))
  225. Folder18.Name = "Animations"
  226. Folder18.Parent = Tool0
  227. Folder19.Name = "ParticleEmitters"
  228. Folder19.Parent = Tool0
  229. for i,v in pairs(mas:GetChildren()) do
  230. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  231. pcall(function() v:MakeJoints() end)
  232. end
  233. mas:Destroy()
  234. for i,v in pairs(cors) do
  235. spawn(function()
  236. pcall(v)
  237. end)
  238. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement