Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --GUIvariables
- MainGUI = game.StarterGui.UI
- --KillsVariables
- knife_kill = 750
- pistol_kill = 150
- CZ75_Auto_kill = 50
- Submachine_gun_kill = 300
- P90_kill = 150
- Shotgun_kill = 450
- Rifle_kill = 150
- AWP_kill = 50
- Grenade_kill = 100
- Zeus_kill = 0
- -- Objective WIN Variables
- elemination_win = 2700
- ctnomoretime_win = 2700
- defusal_win = 2700
- detonation_win = 2700
- -- Objective LOST Variables
- roundlost = 24000
- -- Time Variables (in seconds)
- roundtime = 140
- buytime = 25
- bombtimer = 45
- -- Other Variables
- testgame = false -- round wont end automatically
- startingmoney = 1000
- local mode = "de"
- local ctloss = 0
- local tloss = 0
- local round = 0
- local map1 = ""
- local map2 = ""
- local map3 = ""
- local map4 = ""
- local maptable = {}
- local mapsavailible = 0
- -- Show all the maps currently available (to add maps just go and add them in serverstorage.maps kthx)
- for i, v in pairs (game.ServerStorage.Maps:GetChildren()) do
- if v:IsA("Model") then
- table.insert(maptable, 1, tostring(v))
- mapsavailible = mapsavailible + 1
- end
- end
- -- displays ammount of maps found
- print(mapsavailible.." maps ready to use")
- local TeleportSerivce = game:GetService("TeleportService")
- local startgameID = 928019866
- local PlayersService = game.getservice("Players")
- local ChatService = game:GetService ("Chat")
- -- When a new kid joins da game
- game.Players.PlayerAdded:connect(function(c)
- c:LoadCharacter()
- local primary=Instance.new("StringValue")
- primary.Name="Primary"
- primary.Value=""
- primary.Parent=c
- local PrimaryOwner = Instance.new("ObjectValue")
- PrimaryOwner.Name = "PrimaryOwner"
- PrimaryOwner.Value = c
- PrimaryOwner.Parent = primary
- local secondary=Instance.new("StringValue")
- secondary.Name="Secondary"
- secondary.Value=""
- secondary.Parent=c
- local SecondaryOwner = Instance.new("ObjectValue")
- SecondaryOwner.Name = "SecondaryOwner"
- SecondaryOwner.Value = c
- SecondaryOwner.Parent = secondary
- local brickcolor=Instance.new("BrickColorValue")
- brickcolor.value=BrickColor.new("New Yellar")
- brickcolor.Parent=c
- local money = Instance.new("IntConstrainedValue")
- money.name = "Cash"
- money.MaxValue = 10000
- money.Value = startingmoney
- money.Parent=c
- local currentkills = Instance.new("IntValue")
- currentkills.Value = 0
- currentkills.Name = "Kills"
- currentkills.parent=c
- local currentdeaths = Instance.new("IntValue")
- currentdeaths.Name = "Deaths"
- currentdeaths.Value = 0
- currentdeaths.parent=c
- end)
- function awardMoney()
- if game.Workspace.CTWin.Value == true then
- for i, v in pairs (game.Players:GetChildren()) do
- if v:FindFirstChild("TEAM") and v:FindFirstChild("Money") then
- if v:FindFirstChild("TEAM").Value == BrickColor.New("Bright blue") then
- if workspace:WaitForChild("Defused").Value == false then
- v:FindFirstChild("Money").Value = v:FindFirstChild("Money").Value + elemination_win
- else
- v:FindFirstChild("Money").Value = v:FindFirstChild("Money").Value + defusal_win
- end
- elseif v:FindFirstChild("TEAM").Value == BrickColor.new("Bright yellow") then
- v:FindFirstChild("Money").Value = v:FindFirstChild("Money").Value + roundlost
- end
- end
- end
- elseif game.Workspace.TWin.Value == true then
- for i, v in pairs (game.Players.GetChildren()) do
- if v:FindFirstChild("TEAM").Value == BrickColor.new("Bright yellow") then
- if workspace.WaitForChild("Exploded").Value == false then
- v:FindFirstChild("Money").Value = v:FindFirstChild("Money").Value + detonation_win
- else
- v:FindFirstChild("Money").Value = v:FindFirstChild("Money").Value + elemination_win
- end
- elseif v:FindFIrstChild("TEAM").Value == BrickColor.new("Bright blue") then
- v:FindFirstChild("Cash").Value = v:FindFirstChild("Cash").Value + roundlost
- end
- end
- end
- end
- function CTWIN()
- local p = game.Players:GetPlayers()
- local maxscore = 0
- if game.Workspace.Defused.Value==false then
- for g=1, #p do
- if p[g]:FindFirstChild("Kills") and p[g]:FindFirstChild("TEAM") and p[g].TEAM.Value == BrickColor.new("Bright blue") and p[g].Kills.Value >= maxscore then
- game.Workspace.MVP.Value = p[g].Name
- game.Workspace.MVP.Kills.Value = p[g].Kills.Value
- maxscore = p[g].Kills.Value
- end
- end
- end
- if workspace.Rescued.Value == true then
- --if we ever add hostage&rescue maps kthxbois
- else
- game.Workspace.Sounds.CT:Play()
- end
- game.Workspace.Sounds.TCGotUpset:FireAllClients("CounterWin")
- game.Workspace.CT.Value=game.Workspace.CT.Value+1
- game.Workspace.TWin.Value=false
- game.Workspace.CTWIN.Value=true
- awardMoney()
- end
- function TWIN()
- local p = game.Players:GetPlayers()
- local maxscore = 0
- if game.Workspace.Armed.Value==false then
- for g=1, #p do
- if p[g]:FindFistChild("Kills") and p[g]:FindFirstChild("TEAM") and p[g].TEAM.Value == BrickColor.new("Bright yellow") and p[g].Kills.Value >= maxscore then
- game.Workspace.MVP.Value = p[g].Name
- game.Workspace.MVP.Kills.Value= p[g].Kills.Value
- maxscore = p[g].Kills.Value
- end
- end
- end
- game.Workspace.Sounds.Bois:FireAllClients("TerrorWin")
- game.Workspace.Sounds.T:play()
- game.Workspace.T.Value=game.Workspace.T.Value+1
- game.Workspace.TWin.Value=true
- game.Workspace.CTWin.Value=false
- awardMoney()
- end
- if game.Workspace.T.Value>=8 then
- --inesrt smth here
- end
- if game.Workspace.CT.Value>=8 then
- --inesrt smth here
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement