Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Like everytime click there's gui will pop up that says "1+ strength"?

Like everytime click there's gui will pop up that says "1+ strength"

Thank you!

3 answers

u will need to first make a screengui an in it, put a textbox. place the screengui in the starter gui and edit whatthe textbox needs to say. after that place the textbox in a localscript and put the localscript in starterpack. in the localscript put in the following code:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Button1Down:connect(function()
	local gui = script:FindFirstChild("testscreengui", true) -- or the identity of the screengui
	local guiclone = gui:Clone()
	
	guiclone.Parent = player.PlayerGui
	game:GetService("Debris"):AddItem(guiclone, .5)
end)
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local coolDown = false
local messageTime = 2
Mouse.Button1Down:connect(function()
	if not coolDown then
		coolDown = true
		local Message = Instance.new("TextLabel", Player:WaitForChild("PlayerGui").ScreenGui)
		Message.Position = UDim2.new(math.random(2,8)/10,0,math.random(2,8)/10,0)
		Message.Size = UDim2.new(0.2,0,0.1,0)
		Message.TextScaled = true
		Message.AnchorPoint = Vector2.new(0.5,0.5)
		Message.Text = "+1 Strength"
		wait(messageTime)
		Message:Destroy()
		coolDown = false
	end
end)

Just put this into a local script and insert a screengui into startergui, this is the most basic as it can get it doesn't have any fancy effects/

4 comments

0

Thank you

0

dont spoon feed scripts to other ppl

0

the parent argument of Instance.new() is deprecated, and :connect() is too use :Connect()

0

roasted

This discussion is preserved as it was. New answers, comments, and votes are closed.