Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ds = game:GetService("DataStoreService"):GetDataStore("--Door06")
- local ds2 = game:GetService("DataStoreService"):GetDataStore("--Boat06")
- local ds3 = game:GetService("DataStoreService"):GetDataStore("Fishes01")
- --local pack = game:GetService("ReplicatedStorage"):WaitForChild("Packs")
- local Players = game:GetService("Players")
- function onPlayerEntered(newPlayer)
- wait(.5)
- local key = "door-"..newPlayer.userId
- local key2 = "boat-"..newPlayer.userId
- local key3 = "fishes-"..newPlayer.userId
- --Stat Plyr
- local stats = Instance.new("IntValue")
- local door = Instance.new("IntValue")
- local crntboat = Instance.new("IntValue")
- local course = Instance.new("IntValue")
- local seviyess = Instance.new("Folder")
- --Instance
- local score = Instance.new("IntValue")
- local fish = Instance.new("IntValue")
- --local reb = Instance.new("IntValue")
- local Seviye = Instance.new("IntValue")
- local Xp = Instance.new("IntValue")
- --Classic Value And Name
- score.Name = "💰 Coins"
- score.Value = 0
- fish.Name = "🎣 Fish"
- fish.Value = 0
- --reb.Name = "⏱️ Rebirth"
- --reb.Value = 1
- Seviye.Name = "Seviye"
- Seviye.Value = 1
- Xp.Name = "Xp"
- Xp.Value = 0
- --PlyrStatName and Value
- stats.Name = "leaderstats"
- seviyess.Name = "SeviyeSistemi"
- --pack.Name = "Pack"
- door.Name = "Door"
- door.Value = ""
- crntboat.Name = "CurrentBoat"
- crntboat.Value = 1
- course.Name = "Course"
- course.Value = 0
- --Plyr
- door.Parent = newPlayer
- crntboat.Parent = newPlayer
- course.Parent = newPlayer
- stats.Parent = newPlayer
- seviyess.Parent = newPlayer
- --Stat
- --reb.Parent = stats
- score.Parent = stats
- fish.Parent = stats
- Seviye.Parent = seviyess
- Xp.Parent = seviyess
- Xp.Changed:connect(function() XPChange(newPlayer,Xp,Seviye,score) end)
- local save = ds:GetAsync(key)
- local save2 = ds2:GetAsync(key2)
- local save3 = ds3:GetAsync(key3)
- if save then
- door.Value = save
- elseif save2 then
- crntboat.Value = save2
- elseif save3 then
- fish.Value = save3
- end
- door.Changed:Connect(function()
- ds:SetAsync(key,door.Value)
- end)
- crntboat.Changed:Connect(function()
- ds2:SetAsync(key2,crntboat.Value)
- end)
- fish.Changed:Connect(function()
- ds3:SetAsync(key3,fish.Value)
- end)
- newPlayer.CharacterAdded:Connect(function(char)
- course.Value = 0
- if workspace.Boats:FindFirstChild(newPlayer.Name) then
- workspace.Boats:FindFirstChild(newPlayer.Name):Destroy()
- end
- end)
- end
- function playerremoved(player)
- if workspace.Boats:FindFirstChild(player.Name) then
- workspace.Boats:FindFirstChild(player.Name):Destroy()
- end
- end
- game.Players.ChildAdded:connect(onPlayerEntered)
- game.Players.ChildRemoved:Connect(playerremoved)
- function XPChange(newPlayer,Xp,Seviye,score)
- if Xp.Value >= Seviye.Value*150 then
- Xp.Value = Xp.Value - Seviye.Value*150
- Seviye.Value = Seviye.Value + 1
- score.Value = score.Value + Seviye.Value*150
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement