Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PetsFrameEvent.OnClientEvent:Connect(function(Index) -- when the remote event on the server fires 15 times for no reason it receives the info in here once and i wanted it once:P,but thats a small but i need to figure out in future!!
- if debounce then
- local Player = game:GetService("Players").LocalPlayer
- for i,v in pairs(MainFrame:GetDescendants())do
- --v:GetChildren()
- --print(v)
- if v:IsA("ImageButton") and v.Name == "PetsButton" then -- or v:IsA("StringValue") and v.Name == "PetIndex" or v:IsA("IntValue") and v.Name == "Price"
- debounce = false
- --if v.Name == "PetsButton" then
- --v:GetChildren()
- print(v)
- --if v.Name == "PetsName" then
- --local Pets = PetsFolder:GetChildren()
- --print(Pets)
- --print(PetName.Value)
- --if PetName.Value == Pets.Name then
- local Frame = player:FindFirstChild("PlayerGui"):FindFirstChild("PetsPurchaseGui"):FindFirstChild("BuyPet")
- local FrameInfo = Frame:FindFirstChild("Desc")
- local PetName = v:FindFirstChild("PetIndex").Value
- local PetPrice = v:FindFirstChild("Price").Value
- --PetName = v.Name.Text
- wait()
- FrameInfo.Text = "Are you Sure you want to buy this " .. PetName .. " for " .. PetPrice .. " Coins"
- print(PetName)
- Frame:TweenPosition(
- UDim2.new(0.499, 0,0.494, 0),-- End Position
- "Out", -- Easing Direction
- "Linear", -- Easing Style
- .5 -- Time in Seconds
- )
- Frame.Visible = true
- -- end
- end
- end
- wait(2)
- --print("it works!!")
- debounce = true
- end
- end)
- --https://gyazo.com/8900f47e3406fc06c681b9bc770478e0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement