Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local GameItems = ReplicatedStorage:WaitForChild("GameItems")
- local UI = script.Parent
- local ShopFrame = UI:WaitForChild("ShopFrame")
- local TIP = UI:WaitForChild("ShopTooltip")
- local function addComas(str)
- local x = tostring(str)
- return #x % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or x:reverse():gsub("(%d%d%d)", "%1,"):reverse()
- end
- if true then
- ShopFrame.Draggable = true
- end
- for _,Element in pairs(ShopFrame:WaitForChild("Items"):GetChildren()) do
- if Element:IsA("TextButton") then
- local SelTool = GameItems:WaitForChild(Element:WaitForChild("Item").Value)
- local WPConfig = SelTool:FindFirstChild("WeaponConfig")
- local _MOD = require(WPConfig)
- local function ComputerEnter()
- TIP:WaitForChild("ItemName").Text = Element:WaitForChild("Item").Value
- TIP:WaitForChild("ItemCost").Text = addComas(_MOD.Cost) .. " G$"
- TIP:WaitForChild("ItemInfo").Text = addComas(_MOD.MinDamage) .. "-" .. addComas(_MOD.MaxDamage) .. " DMG / CD: " .. addComas(_MOD.Cooldown)
- TIP.Position = UDim2.new(0,plr:GetMouse().X+1,0,plr:GetMouse().Y+30)
- TIP.Visible = true
- end
- local function ComputerMoved()
- TIP.Position = UDim2.new(0,plr:GetMouse().X+1,0,plr:GetMouse().Y+30)
- end
- local function ComputerLeave()
- TIP.Visible = false
- TIP:WaitForChild("ItemName").Text = tostring(nil)
- TIP:WaitForChild("ItemCost").Text = tostring(nil)
- TIP:WaitForChild("ItemInfo").Text = tostring(nil)
- TIP.Position = UDim2.new(0,0,0,0)
- end
- local function ConsoleEnter()
- TIP:WaitForChild("ItemName").Text = Element:WaitForChild("Item").Value
- TIP:WaitForChild("ItemCost").Text = addComas(_MOD.Cost) .. " G$"
- TIP:WaitForChild("ItemInfo").Text = addComas(_MOD.MinDamage) .. "-" .. addComas(_MOD.MaxDamage) .. " DMG / CD: " .. addComas(_MOD.Cooldown)
- TIP.Position = UDim2.new(0.325,0,0.5,100)
- TIP.Visible = true
- end
- local function ConsoleLeave()
- TIP.Visible = false
- TIP:WaitForChild("ItemName").Text = tostring(nil)
- TIP:WaitForChild("ItemCost").Text = tostring(nil)
- TIP:WaitForChild("ItemInfo").Text = tostring(nil)
- TIP.Position = UDim2.new(0,0,0,0)
- end
- Element.MouseEnter:Connect(ComputerEnter)
- Element.MouseMoved:Connect(ComputerMoved)
- Element.MouseLeave:Connect(ComputerLeave)
- Element.SelectionGained:Connect(ConsoleEnter)
- Element.SelectionLost:Connect(ConsoleLeave)
- end
- end
Add Comment
Please, Sign In to add comment