I know the needed material to script, I've been scripting for around 5 years now and I can do any needed stuff such as Data stores, UI(s), Doors, API calls, Events, etc basically, anything you need me to do is possible.
I also should note i keep my code clean and organized, As well as adding notes and reference points for those who need it. I also stratigize in modular requests such as gun systems, doors, etc that need simple changing values for those who dont know how to script.Â
I learned to script by training from an advanced-level scripter who taught me everything they knew, Meaning I can do a quite a bit scripting wise.
This was some work I did on a simple button that teamed you and showed your rank for that team, and group in the overhead UI.
local Initial = string.sub(script.Parent.Name, 1, 1)
script.Parent.Text = Initial
script.Parent.BackgroundColor3 = script.Parent.Team.Value.TeamColor.Color
script.Parent.MouseEnter:Connect(function()
script.Parent.Title.Text = script.Parent.Name
script.Parent.Title.Visible = true
end)
script.Parent.MouseLeave:Connect(function()
script.Parent.Title.Visible = false
end)
local TeamEvent = script.Parent.Parent.TeamEvent
script.Parent.MouseButton1Click:Connect(function()
TeamEvent:FireServer(script.Parent.Team.Value.Name, script.Parent.GroupID.Value)
script.Parent.Parent.Parent.Parent.HUD.Enabled = true
local StarterUI = game:GetService("StarterGui")
StarterUI:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
StarterUI:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
StarterUI:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, true)
for _, item in pairs(script.Parent.Parent:GetChildren()) do
if item.ClassName == "TextButton" then
item:FindFirstChild("Title").Visible = false
end
end
script.Parent.Parent.Parent.Enabled = false
end)
This one is quite simple, But it basically went through and checked alot of values of the groups, Then it showed the button if you were in it.
local TeamsList = script.Parent
for _, item in pairs(TeamsList:GetChildren()) do
if item:IsA("TextButton") then
if game.Players.LocalPlayer:GetRankInGroup(item.GroupID.Value) >= item.MinRank.Value then
item.Visible = true
else
item.Visible = false
end
end
end
This is a script that basically just made you walk faster and panned out your camera's view. Again, Pretty basic but shows simple things i can do.
local NormalWalkSpeed = 16
local SprintSpeed = 35
local CameraEffect = true
local cas = game:GetService("ContextActionService")
local Leftc = Enum.KeyCode.LeftControl
local RightC = Enum.KeyCode.RightControl
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local Humanoid = char:WaitForChild("Humanoid")
local Camera = game.Workspace.CurrentCamera
local TweenService = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(key, gameProcessed)
if gameProcessed then return end
if key.KeyCode == Enum.KeyCode.LeftShift then
if CameraEffect == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 90}):Play()
end
Humanoid.WalkSpeed = 35
end
end)
UIS.InputEnded:Connect(function(key, gameProcessed)
if gameProcessed then return end
if key.KeyCode == Enum.KeyCode.LeftShift then
if CameraEffect == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 70}):Play()
end
Humanoid.WalkSpeed = NormalWalkSpeed
end
end)
---------------------------------------------------Â
local function handleContext(name, state, input)
if state == Enum.UserInputState.Begin then
if CameraEffect == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 90}):Play()
end
Humanoid.WalkSpeed = 35
else
if CameraEffect == true then
TweenService:Create(Camera, TweenInfo.new(0.5), {FieldOfView = 70}):Play()
end
Humanoid.WalkSpeed = NormalWalkSpeed
end
end
cas:BindAction("Sprint", handleContext, true, Leftc, RightC)
cas:SetPosition("Sprint", UDim2.new(.2, 0, .5, 0))
cas:SetTitle("Sprint", "Sprint")
cas:GetButton("Sprint").Size = UDim2.new(.3, 0, .3, 0)
This is a basic script that handled the OverheadUI for a game I was working on, Was pretty simple.Â
local OverheadUIItem = game:GetService("ReplicatedStorage").OverheadUI
local PlayerValues = game:GetService("ReplicatedStorage").PlayerValues
game.Players.PlayerAdded:Connect(function(Plr)
local PlayerValuesClone = PlayerValues:Clone()
PlayerValues.Parent = Plr
Plr.CharacterAdded:Connect(function(ModelOfPlayer)
local ClonedItem = OverheadUIItem:Clone()
ClonedItem.Parent = ModelOfPlayer:FindFirstChild("Head")
for _, Item in pairs(Plr.Backpack:GetChildren()) do
Item:Destroy()
end
for _, item in pairs(game:GetService("Teams"):FindFirstChild(Plr.Team.Name):GetChildren()) do
local ItemToClone = game:GetService("ReplicatedStorage").ReplicatedMixedTools:FindFirstChild(item.Name)
local ClonedItem = ItemToClone:Clone()
ClonedItem.Parent = Plr.Backpack
end
end)
end)
Gun system:
This was a challenge to see how small I could make a gun system without major raycasting, It was literally just a dare in a scripter community I'm in.
Part 1:
local Tool = script.Parent.Parent
local LocalPlayer = game:GetService("Players").LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local Event = script.Parent:WaitForChild("Fire")
local FiringValue = script.Parent.Firing
local Settings = script.Parent.Parent.Settings
local Ammo = script.Parent.Ammo
local Damage = Settings:GetAttribute("Damage")
local IsTeamKill = Settings:GetAttribute("Team_Kill")
local MaxAmmo = Settings:GetAttribute("Max_Ammo")
local UserInputService = game:GetService("UserInputService")
local RestEvent = script.Parent.RestEvent
local FireRate = script.Parent.Parent.Settings:GetAttribute("Fire_Rate_Per_S")
Tool.Equipped:Connect(function()
script.Parent.Resting.Value = false
RandomSet1 = UserInputService.InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.Q then
if script.Parent.Resting.Value == true then
RestEvent:FireServer(true)
script.Parent.Resting.Value = false
else
RestEvent:FireServer(false)
script.Parent.Resting.Value = true
end
end
end)
end)
Tool.Unequipped:Connect(function()
RandomSet1:Disconnect()
end)
Tool.Activated:Connect(function()
if Ammo.Value <= 0 then
else
if script.Parent.Resting.Value == false then
FiringValue.Value = true
end
end
end)
Tool.Deactivated:Connect(function()
FiringValue.Value = false
end)
while task.wait(FireRate) do
if FiringValue.Value == true then
if script.Reloading.Value == true then
--Do nothing here
else
Ammo.Value = Ammo.Value - 1
Event:FireServer(Mouse.Hit.Position, Damage, IsTeamKill)
if Ammo.Value <= 0Â then
script.Reloading.Value = true
script.Parent.Reload:FireServer(MaxAmmo)
task.wait(2.5)
Ammo.Value = MaxAmmo
script.Reloading.Value = false
end
end
end
end
Part 2:
local Event = script.Parent.Fire
local Beam = game:GetService("ReplicatedStorage").GunBeam
local BarrelEndingSpot = script.Parent.Parent.BarrelEndingSpot
script.Parent.Parent.Equipped:Connect(function(Mouse)
local LocalHumanoid = script.Parent.Parent.Parent:WaitForChild("Humanoid")
local AnimiationAim = script.Parent.Aim
local AnimationRest = script.Parent.Rest
local AnimiationReload = script.Parent.ReloadAnim
LoadedAim = LocalHumanoid:LoadAnimation(AnimiationAim)
LoadRest = LocalHumanoid:LoadAnimation(AnimationRest)
LoadReload = LocalHumanoid:LoadAnimation(AnimiationReload)
LoadedAim:Play()
end)
script.Parent.RestEvent.OnServerEvent:Connect(function(Plr, Value)
if Value == true then
--Stop Aiming
LoadedAim:Play()
LoadRest:Stop()
else
--Start Aiming
LoadedAim:Stop()
LoadRest:Play()
end
end)
script.Parent.Parent.Unequipped:Connect(function(Mouse)
LoadedAim:Stop()
LoadRest:Stop()
LoadReload:Stop()
end)
script.Parent.Reload.OnServerEvent:Connect(function(PlrSending, MaxAmmo)
print(MaxAmmo)
LoadReload:Play()
LoadedAim:Stop()
task.wait(2.49)
script.Parent.Ammo.Value = MaxAmmo
LoadReload:Stop()
LoadedAim:Play()
end)
Event.OnServerEvent:Connect(function(PlrSending, BulletPosition, Damage, IsTeamKill)
local ClonedBeam = Beam:Clone()
ClonedBeam.Parent = workspace
ClonedBeam.StartBeam.Position = BarrelEndingSpot.Position
ClonedBeam.EndBeam.Position = BulletPosition
ClonedBeam.StartBeam.Attachment.Parent = BarrelEndingSpot
ClonedBeam.EndBeam.TeamKill.Value = IsTeamKill
ClonedBeam.EndBeam.Damage.Value = Damage
game:GetService("SoundService").GunFireOne:Play()
ClonedBeam.EndBeam.Size = Vector3.new(0.1, 0.1, 0.1)
task.wait(0.1)
ClonedBeam.EndBeam.Size = Vector3.new(1,1,1)
ClonedBeam.EndBeam.Touched:Connect(function(OtherPart)
local Player = game:GetService("Players"):FindFirstChild(OtherPart.Parent.Name)
OtherPart.Parent:WaitForChild("Humanoid"):TakeDamage(ClonedBeam.EndBeam.Damage.Value)
end)
task.wait(0.04)
ClonedBeam:Destroy()
end)