Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- All made by noam#5887 the first exploiter in nations roleplay
- A collection of most of the scripts I made for this game all in one
- Commands:
- invert/ - inverts map color
- rainbow/ - makes the map rainbow
- setcolor/color - sets the entire map to the one color
- random/ - randomizes the map colors making it a mess
- replace/color/newcolor - replaces the the map (doesn't work with a lot of colors sadly)
- name/target/name - sets the target's rp name
- noname/ - remove your rp name
- SAVE COMMANDS:
- these commands only save after leaving if your exploit has a filesystem api
- however if you arent using a good exploit then it will saved until you leave or rejoin
- save/name - saves the map
- load/name - loads a save
- del/name - deletes a save
- default save lists for exploits with no filesystem api:
- default - the default map
- inverted - the default map but inverted
- ]]--
- local cansave,saves = true,nil
- if not (isfolder and makefolder and readfile and writefile and isfile) then
- cansave = false
- saves = loadstring(game:HttpGet("https://pastebin.com/raw/7jHCikse"))()
- end
- if cansave then
- if not isfolder("mapgame") then makefolder("mapgame") end
- if not isfolder("mapgame/saves") then makefolder("mapgame/saves") end
- end
- local plr = game.Players.LocalPlayer
- local t = plr.Backpack:FindFirstChild("PaintBucket") or plr.Character:FindFirstChild("PaintBucket")
- function get(p)
- local p1 = p.Position - (p.Size / 2)
- local p2 = p.Position + (p.Size / 2)
- return p1,p2
- end
- local r1 = {math.huge,math.huge,math.huge}
- local r2 = {0,0,0}
- for i,v in next,workspace.Provinces:GetDescendants() do
- if v:IsA("BasePart") and v.Name == "Province" then
- local p1,p2 = get(v)
- if p1.X < r1[1] then r1[1] = p1.X end
- if p1.Y < r1[2] then r1[2] = p1.Y end
- if p1.Z < r1[3] then r1[3] = p1.Z end
- if p2.X > r2[1] then r2[1] = p2.X end
- if p2.Y > r2[2] then r2[2] = p2.Y end
- if p2.Z > r2[3] then r2[3] = p2.Z end
- end
- end
- r1 = Vector3.new(unpack(r1))
- r2 = Vector3.new(unpack(r2))
- local r = Region3.new(r1,r2)
- function paint(rem, part, color)
- return rem:InvokeServer("PaintPart", {Part = part;Color = color})
- end
- function checkcol(c1, c2)
- return c1.R == c2.R and c1.G == c2.G and c1.B == c2.B
- end
- function invertColor(p)
- return Color3.new(1-p.Color.R,1-p.Color.G,1-p.Color.B)
- end
- function invert()
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") then
- local c = invertColor(v)
- if v.Name == "Province" and not checkcol(v.Color, c) then
- spawn(function() paint(r,v,c) end)
- end
- end
- end
- end
- end
- function rainbowColor(p)
- return Color3.fromHSV(math.abs((p.Position.X-r.CFrame.X)/r.Size.X),1,1)
- end
- function rainbow()
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") then
- local c = rainbowColor(v)
- if v.Name == "Province" and not checkcol(v.Color, c) then
- spawn(function() paint(r,v,c) end)
- end
- end
- end
- end
- end
- function save(name)
- local t = {
- }
- function new(i)
- table.insert(t,{i.Position;i.Color})
- end
- for i,v in next,workspace.Provinces:GetDescendants() do
- if v:IsA("BasePart") and v.Name == "Province" then
- new(v)
- end
- end
- local s = "return {"
- for i,v in next, t do
- s = s.."{Vector3.new("..v[1].X..","..v[1].Y..","..v[1].Z..");Color3.new("..v[2].R..","..v[2].G..","..v[2].B..")};"
- end
- s = s.."}"
- if cansave then
- writefile("mapgame/saves/"..name..".lua",s)
- else
- saves[name] = s
- end
- end
- function loadColor(T,p)
- for i = 1,#T do
- local I
- if i%2 == 0 then
- I = #T+1-math.floor(i/2)
- else
- I = math.floor(i/2+.5)
- end
- if p.Position == T[I][1] then c = T[I][2] table.remove(T,I) return c end
- end
- end
- function loadmap(name)
- if cansave then
- if not isfile("mapgame/saves/"..name..".lua") then return false end
- else
- if saves[name] == nil then return false end
- end
- local T
- if cansave then
- T = loadstring(readfile("mapgame/saves/"..name..".lua"))()
- else
- T = loadstring(saves[name])()
- end
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") and v.Name == "Province" then
- local c = loadColor(T,v)
- if not checkcol(v.Color, c) then
- spawn(function() paint(r,v,c) end)
- end
- end
- end
- end
- end
- function name(n,t)
- for i,v in next,game.Players:GetPlayers() do
- if n:lower() == v.Name:lower():sub(1,#n) or n:lower() == v.DisplayName:lower():sub(1,#n) or n:lower() == "all" then
- for I,V in next, v.Character:GetChildren() do
- if V:FindFirstChild("ServerHandler") then
- spawn(function() V.ServerHandler:FireServer(t) end)
- end
- end
- end
- end
- end
- function setcolor(color)
- local c = BrickColor.new(color).Color
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") then
- if v.Name == "Province" and not checkcol(v.Color, c) then
- spawn(function() paint(r,v,c) end)
- end
- end
- end
- end
- end
- function replace(col1,col2)
- local c1 = BrickColor.new(col1)
- local c2 = BrickColor.new(col2)
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") then
- if v.Name == "Province" and v.BrickColor == c1 then
- spawn(function() paint(r,v,c2.Color) end)
- end
- end
- end
- end
- end
- function RAND()
- if t then
- if t.Parent == plr.Backpack then plr.Character.Humanoid:EquipTool(t) end
- local r = t:WaitForChild("Remotes"):WaitForChild("ServerControls")
- for i,v in next, workspace.Provinces:GetChildren() do
- if v:IsA("BasePart") then
- local c = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
- if v.Name == "Province" and not checkcol(v.Color, c) then
- spawn(function() paint(r,v,c) end)
- end
- end
- end
- end
- end
- plr.Chatted:Connect(function(msg,r)
- t = plr.Backpack:FindFirstChild("PaintBucket") or plr.Character:FindFirstChild("PaintBucket")
- if msg:find("/") == nil then return end
- local cmd = msg:split("/")[1]
- local a = {select(2,unpack(msg:split("/")))}
- if cmd == "invert" then
- invert()
- elseif cmd == "rainbow" then
- rainbow()
- elseif cmd == "save" then
- save(a[1])
- elseif cmd == "load" then
- loadmap(a[1])
- elseif cmd == "del" then
- if cansave then
- delfile("mapgame/saves/"..a[1]..".lua")
- else
- saves[a[1]] = nil
- end
- elseif cmd == "name" then
- name(a[1],a[2])
- elseif cmd == "noname" then
- for i,v in next, plr.Character:GetChildren() do
- local h = v:FindFirstChild("Humanoid")
- if h then h = h.Parent.Head h.Weld:Destroy() end
- end
- elseif cmd == "setcolor" then
- setcolor(a[1])
- elseif cmd == "replace" then
- replace(a[1],a[2])
- elseif cmd == "random" then
- RAND()
- end
- end)
RAW Paste Data
Copied