Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create SECURITY.md #3

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Create SECURITY.md #3

merged 1 commit into from
Aug 23, 2024

Conversation

ijunxyz123
Copy link
Owner

-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local StarterGui = game:GetService("StarterGui")

-- Variables
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")

-- Player Setup
local function setupPlayer(player)
-- Set up player properties
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")

    -- Example: Set player health
    humanoid.MaxHealth = 100
    humanoid.Health = 100
    
    -- Example: Teleport player to a specific location
    rootPart.CFrame = CFrame.new(Vector3.new(0, 10, 0))
end)

end

-- Character Handler
local function setupCharacter(character)
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")

-- Example: Add a tool to the character
local tool = Instance.new("Tool")
tool.Name = "ExampleTool"
tool.Parent = character

-- Example: Add interactivity
tool.Activated:Connect(function()
    print("Tool activated!")
end)

end

-- Connect player setup
Players.PlayerAdded:Connect(setupPlayer)

-- Initial setup for existing players
for _, player in pairs(Players:GetPlayers()) do
setupPlayer(player)
end

-- GUI Setup
local function setupGui(player)
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = player:WaitForChild("PlayerGui")

local textLabel = Instance.new("TextLabel")
textLabel.Size = UDim2.new(0, 200, 0, 50)
textLabel.Position = UDim2.new(0.5, -100, 0, 10)
textLabel.Text = "Welcome to the Game!"
textLabel.Parent = screenGui

end

-- Connect GUI setup
Players.PlayerAdded:Connect(setupGui)

-- Initial setup for existing players
for _, player in pairs(Players:GetPlayers()) do
setupGui(player)
end
Players.LocalPlayerhumanoid.MaxHealthplayer.Characterhumanoid.Health100tool.NamerootPart.CFramescreenGui.Parenttool.ParentUDim2.new(0, 200, 0, 50)
textLabel.PositiontextLabel.SizetextLabel.TexttextLabel.Parent

Signed-off-by: ijunxyz123 <ijunxyz123@gmail.com>
@ijunxyz123 ijunxyz123 merged commit f4b96cc into main Aug 23, 2024
@ijunxyz123 ijunxyz123 deleted the ijunxyz123-patch-1 branch August 23, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant