Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- StringValue1 = Instance.new("StringValue")
- Folder2 = Instance.new("Folder")
- NumberValue3 = Instance.new("NumberValue")
- LocalScript4 = Instance.new("LocalScript")
- NumberValue5 = Instance.new("NumberValue")
- LocalScript6 = Instance.new("LocalScript")
- NumberValue7 = Instance.new("NumberValue")
- LocalScript8 = Instance.new("LocalScript")
- ScreenGui9 = Instance.new("ScreenGui")
- Frame10 = Instance.new("Frame")
- TextLabel11 = Instance.new("TextLabel")
- LocalScript12 = Instance.new("LocalScript")
- TextLabel13 = Instance.new("TextLabel")
- LocalScript14 = Instance.new("LocalScript")
- TextLabel15 = Instance.new("TextLabel")
- LocalScript16 = Instance.new("LocalScript")
- LocalScript17 = Instance.new("LocalScript")
- Folder18 = Instance.new("Folder")
- Folder19 = Instance.new("Folder")
- Tool0.Name = "BaseWeapon"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=7673024"
- Tool0.ToolTip = "[Tool]"
- Tool0.CanBeDropped = false
- StringValue1.Name = "WeaponType"
- StringValue1.Parent = Tool0
- StringValue1.Value = "NaN"
- Folder2.Name = "Stats"
- Folder2.Parent = Tool0
- NumberValue3.Name = "Defense"
- NumberValue3.Parent = Folder2
- NumberValue3.Value = 1
- LocalScript4.Parent = NumberValue3
- LocalScript4.Disabled = true
- table.insert(cors,sandbox(LocalScript4,function()
- local val = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- val.Value = char.Defense.Value
- wait()
- end
- end))
- NumberValue5.Name = "Power"
- NumberValue5.Parent = Folder2
- LocalScript6.Parent = NumberValue5
- LocalScript6.Disabled = true
- table.insert(cors,sandbox(LocalScript6,function()
- local val = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- val.Value = char.Power.Value
- wait()
- end
- end))
- NumberValue7.Name = "Speed"
- NumberValue7.Parent = Folder2
- LocalScript8.Parent = NumberValue7
- LocalScript8.Disabled = true
- table.insert(cors,sandbox(LocalScript8,function()
- local val = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- val.Value = math.floor(hum.WalkSpeed/16*10)/10
- wait()
- end
- end))
- ScreenGui9.Name = "StatGui"
- ScreenGui9.Parent = Tool0
- Frame10.Name = "Stats"
- Frame10.Parent = ScreenGui9
- Frame10.Size = UDim2.new(0.150000006, 1, 0.150000006, 1)
- Frame10.Style = Enum.FrameStyle.RobloxRound
- Frame10.Position = UDim2.new(0.845000029, 0, 0.845000029, 0)
- Frame10.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame10.BorderSizePixel = 0
- TextLabel11.Name = "Power"
- TextLabel11.Parent = Frame10
- TextLabel11.Size = UDim2.new(0.333000004, 1, 1, 1)
- TextLabel11.Text = "Pow:(#)"
- TextLabel11.BackgroundColor3 = Color3.new(1, 0.333333, 0)
- TextLabel11.BorderSizePixel = 0
- TextLabel11.Font = Enum.Font.ArialBold
- TextLabel11.FontSize = Enum.FontSize.Size14
- TextLabel11.TextColor3 = Color3.new(1, 1, 1)
- TextLabel11.TextScaled = true
- TextLabel11.TextStrokeTransparency = 0
- TextLabel11.TextWrapped = true
- LocalScript12.Parent = TextLabel11
- table.insert(cors,sandbox(LocalScript12,function()
- local tg = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- tg.Text = ("Pow:("..tostring(char:WaitForChild("BaseWeapon").Stats.Power.Value)..")")
- wait()
- end
- end))
- TextLabel13.Name = "Defense"
- TextLabel13.Parent = Frame10
- TextLabel13.Size = UDim2.new(0.333000004, 1, 1, 1)
- TextLabel13.Text = "Def:(#)"
- TextLabel13.Position = UDim2.new(0.333000004, 0, 0, 0)
- TextLabel13.BackgroundColor3 = Color3.new(0, 0.666667, 1)
- TextLabel13.BorderSizePixel = 0
- TextLabel13.Font = Enum.Font.ArialBold
- TextLabel13.FontSize = Enum.FontSize.Size14
- TextLabel13.TextColor3 = Color3.new(1, 1, 1)
- TextLabel13.TextScaled = true
- TextLabel13.TextStrokeTransparency = 0
- TextLabel13.TextWrapped = true
- LocalScript14.Parent = TextLabel13
- table.insert(cors,sandbox(LocalScript14,function()
- local tg = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- tg.Text = ("Def:("..tostring(char:WaitForChild("BaseWeapon").Stats.Defense.Value)..")")
- wait()
- end
- end))
- TextLabel15.Name = "Speed"
- TextLabel15.Parent = Frame10
- TextLabel15.Size = UDim2.new(0.333000004, 1, 1, 1)
- TextLabel15.Text = "Spd:(#)"
- TextLabel15.Position = UDim2.new(0.666000009, 0, 0, 0)
- TextLabel15.BackgroundColor3 = Color3.new(1, 1, 0)
- TextLabel15.BorderSizePixel = 0
- TextLabel15.Font = Enum.Font.ArialBold
- TextLabel15.FontSize = Enum.FontSize.Size14
- TextLabel15.TextColor3 = Color3.new(1, 1, 1)
- TextLabel15.TextScaled = true
- TextLabel15.TextStrokeTransparency = 0
- TextLabel15.TextWrapped = true
- LocalScript16.Parent = TextLabel15
- table.insert(cors,sandbox(LocalScript16,function()
- local tg = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- while true do
- tg.Text = ("Spd:("..tostring(char:WaitForChild("BaseWeapon").Stats.Speed.Value)..")")
- wait()
- end
- end))
- LocalScript17.Name = "ToolScript"
- LocalScript17.Parent = Tool0
- table.insert(cors,sandbox(LocalScript17,function()
- local tool = script.Parent
- local plr = game.Players.LocalPlayer
- local char = workspace:WaitForChild(plr.Name)
- local hum = char:WaitForChild("Humanoid")
- function Equipped()
- print('Equipped')
- local gooey = tool.StatGui:Clone()
- gooey.Parent = plr.PlayerGui
- tool.Stats.Power.LocalScript.Disabled = false
- tool.Stats.Defense.LocalScript.Disabled = false
- tool.Stats.Speed.LocalScript.Disabled = false
- end
- function UnEquipped()
- print('UnEquipped')
- plr.PlayerGui.StatGui:Destroy()
- tool.Stats.Power.LocalScript.Disabled = true
- tool.Stats.Defense.LocalScript.Disabled = true
- tool.Stats.Speed.LocalScript.Disabled = true
- end
- function Activated()
- print('Activated')
- end
- function UnActivated()
- print('UnActivated')
- end
- tool.Equipped:connect(Equipped)
- tool.Unequipped:connect(UnEquipped)
- tool.Activated:connect(Activated)
- tool.Deactivated:connect(UnActivated)
- end))
- Folder18.Name = "Animations"
- Folder18.Parent = Tool0
- Folder19.Name = "ParticleEmitters"
- Folder19.Parent = Tool0
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement