Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ One of the most powerful script I, Despairus, have ever made
- And also one the oldest that i never got around to releasing,
- so here it is. (ITS A LOCAL SCRIPT!) ]]
- script.Parent = nil
- script.Name = "DESPAIR.GUI()"
- local plrs = game:GetService("Players")
- local ws = game:GetService("Workspace")
- local hitDeb = false
- local insert_types = {"ForceField", "Fire", "Smoke", "Sparkles", "CylinderMesh", "Part", "SpawnLocation"}
- local modes = {"dissolve", "delete", "punish", "unpunish", "invisible", "visible", "ff", "unff", "kill", "kick", "god", "script", "explode", "teleport", "freeze", "thaw", "clean", "base", "antigrav", "grav", "rejoin", "color", "time", "brightness", "fog", "ambience", "run", "walk", "mortal", "jump", "sit", "message", "Explorer_PropertiesMode"}
- local mode = "dissolve"
- local user_name = plrs.LocalPlayer.Name
- renderstep_con = nil
- platforming = false
- hovermode = false
- platform = Instance.new("Part")
- function isnumber(txt)
- if (type(tonumber(txt)) == "number") then
- return true
- else
- return false
- end
- end
- function s_left(gui) --[[ gets the left surface of a gui ]]
- return gui.Position.X.Scale
- end
- function s_top(gui) --[[ gets the top surface of a gui ]]
- return gui.Position.Y.Scale
- end
- function s_right(gui) --[[ gets the right surface of a gui ]]
- return gui.Position.X.Scale+gui.Size.X.Scale
- end
- function s_bottom(gui) --[[ gets the bottom surface of a gui ]]
- return gui.Position.Y.Scale+gui.Size.Y.Scale
- end
- function showmsg(msg,dur)
- local alert = Instance.new("Hint", User.PlayerGui)
- alert.Text = msg
- Delay(dur, function() alert:Remove() end)
- end
- --[[ ------------------------ BEGINNING OF INTERFACE -----------------------------]]
- function BEGININTERFACE() --[[ Begin the GUI interface ]]
- wait(1.6)
- local User = plrs.LocalPlayer
- local sg = Instance.new("ScreenGui", User.PlayerGui)
- sg.Name = "INTERFACE"
- local function showguimsg(txttype, btn_mousedown, caption, txt)
- for _,v in pairs(User.PlayerGui:GetChildren()) do
- if (v.Name == "GUIMSG") then v:Remove() end
- end
- local sgui = Instance.new("ScreenGui", User.PlayerGui)
- sgui.Name = "GUIMSG"
- local fr = Instance.new("Frame", sgui)
- if (string.len(txt) < 100) then
- fr:TweenSize(UDim2.new(0.3,0,0.3,0), "Out", "Quad", 0.5, false, nil)
- fr:TweenPosition(UDim2.new(0.4,0,0.4,0), "Out", "Quad", 0.5, false, nil)
- else
- fr:TweenSize(UDim2.new(0.4,0,0.8,0), "Out", "Quad", 0.5, false, nil)
- fr:TweenPosition(UDim2.new(0.3,0,0,0), "Out", "Quad", 0.5, false, nil)
- end
- fr.BackgroundColor3 = Color3.new(0,0,0)
- fr.BorderColor3 = Color3.new(1,1,1)
- local capt = Instance.new("TextLabel", fr)
- capt.BackgroundColor3 = Color3.new(0,0,0)
- capt.BorderColor3 = Color3.new(1,1,1)
- capt.TextColor3 = Color3.new(1,1,1)
- capt.Size = UDim2.new(1,0,0.12,0)
- capt.Text = caption
- capt.FontSize = "Size24"
- local msg = Instance.new(txttype, fr)
- msg.Position = UDim2.new(0,0,capt.Size.Y.Scale,0)
- msg.Size = UDim2.new(1,0,1-capt.Size.Y.Scale,0)
- msg.BackgroundColor3 = Color3.new(0,0,0)
- msg.BorderColor3 = Color3.new(1,1,1)
- msg.TextColor3 = Color3.new(1,1,1)
- msg.Text = txt
- local exit = Instance.new("TextButton", fr)
- exit.BackgroundColor3 = Color3.new(1,0,0)
- exit.BorderColor3 = Color3.new(1,1,1)
- exit.TextColor3 = Color3.new(1,1,1)
- exit.Position = UDim2.new(capt.Size.X.Scale-capt.Size.Y.Scale, 0, 0, 0)
- exit.Size = UDim2.new(capt.Size.Y.Scale,0,capt.Size.Y.Scale,0)
- exit.ZIndex = 10
- exit.Text = "X"
- exit.FontSize = "Size24"
- exit.MouseButton1Down:connect(function() sgui:Remove() end)
- if (txttype == "TextBox" and btn_mousedown ~= nil) then
- local btn = Instance.new("TextButton", fr)
- btn.BackgroundColor3 = Color3.new(0,1,0)
- btn.TextColor3 = Color3.new(1,1,1)
- btn.Size = UDim2.new(1,0,0.08,0)
- btn.Position = UDim2.new(0,0,0.92,0)
- btn.Text = "Execute"
- btn.Name = "Btn_PropertyExecute"
- btn.ZIndex = 10
- btn.MouseButton1Down:connect(function() xpcall(function() btn_mousedown(msg.Text) sgui:Remove() end, function(error) showmsg(error, 3) end) end)
- end
- end
- local frame = Instance.new("Frame", sg)
- frame.Size = UDim2.new(0.6,0,0.6,0)
- frame.Position = UDim2.new(0.05,0,0.25,0)
- frame.BackgroundTransparency = 0.7
- local open = Instance.new("TextButton", sg)
- open.Size = UDim2.new(0.05,0,0.05,0)
- open.Position = UDim2.new(0,0,0.4,0)
- open.BackgroundColor3 = Color3.new(0,0,0)
- open.TextColor3 = Color3.new(1,1,1)
- open.BorderColor3 = Color3.new(1,1,1)
- open.Visible = false
- open.Text = ">"
- local close = Instance.new("TextButton", frame)
- close.Size = UDim2.new(0.06,0,0.06,0)
- close.Position = UDim2.new(0.94,0,0,0)
- close.BackgroundColor3 = Color3.new(1,0,0)
- close.TextColor3 = Color3.new(1,1,1)
- close.BorderColor3 = Color3.new(1,1,1)
- close.FontSize = "Size18"
- close.Text = "X"
- local caption = Instance.new("TextLabel", frame)
- caption.Size = UDim2.new(close.Position.X.Scale,0,close.Size.Y.Scale,0)
- caption.BackgroundColor3 = Color3.new(0,0,0)
- caption.TextColor3 = Color3.new(1,1,1)
- caption.BorderColor3 = Color3.new(1,1,1)
- caption.Name = "Caption"
- caption.FontSize = "Size18"
- local scrollframe = Instance.new("ScrollingFrame", sg)
- scrollframe.Visible = false
- scrollframe.Size = UDim2.new(0.26,0,frame.Size.Y.Scale,0)
- scrollframe.Position = UDim2.new(s_right(frame),0,s_top(frame),0)
- scrollframe.BackgroundTransparency = frame.BackgroundTransparency
- scrollframe.BackgroundColor3 = Color3.new(100,100,100)
- local selected_obj = {}
- local selected_btn = {}
- local currently_searching_in = ws
- local function f_deselect()
- for i=1,#selected_btn do
- selected_btn[i].BackgroundColor3 = Color3.new(0,0,0)
- end
- selected_obj = {}
- selected_btn = {}
- end
- local function refresh(obj)
- if (mode ~= "Explorer_PropertiesMode") then
- scrollframe:ClearAllChildren()
- wait()
- local _childs = obj:GetChildren()
- for i = 1,#_childs do
- pcall(function() --[[ required incase it scans anything outside of workspace and fails to work ]]
- local partbtn = Instance.new("TextButton", scrollframe)
- partbtn.Size = UDim2.new(0.925,0,0.025,0)
- partbtn.Position = UDim2.new(0,0,(partbtn.Size.Y.Scale*i)-partbtn.Size.Y.Scale,0)
- partbtn.BackgroundColor3 = Color3.new(0,0,0)
- partbtn.TextColor3 = Color3.new(1,1,1)
- partbtn.BorderColor3 = Color3.new(1,1,1)
- partbtn.MouseButton2Down:connect(function()
- pcall(function()
- if (partbtn.BackgroundColor3 == Color3.new(1,0,0)) then
- for i=1,#selected_btn do
- if (selected_btn[i] == partbtn) then
- table.remove(selected_btn, i)
- table.remove(selected_obj, i)
- partbtn.BackgroundColor3 = Color3.new(0,0,0)
- end
- end
- else
- table.insert(selected_obj, _childs[i])
- table.insert(selected_btn, partbtn)
- partbtn.BackgroundColor3=Color3.new(1,0,0)
- end
- end)
- end)
- partbtn.MouseButton1Down:connect(function()
- f_deselect()
- currently_searching_in = _childs[i]
- refresh(currently_searching_in)
- end)
- partbtn.Name = "btn_" ..i
- partbtn.Text = _childs[i].Name.. ", Class: " .._childs[i].ClassName.. "."
- partbtn.BackgroundTransparency = frame.BackgroundTransparency
- end)
- end
- else
- scrollframe:ClearAllChildren()
- wait()
- local _childs = {}
- local cn = obj.ClassName
- if (cn == "Humanoid") then
- _childs = {"Name", "MaxHealth", "Health", "WalkSpeed"}
- elseif (cn == "Script") then
- _childs = {"Name", "Source"}
- elseif (cn == "Model") then
- _childs = {"Name"}
- elseif (cn == "StringValue" or cn == "NumberValue" or cn == "IntValue") then
- _childs = {"Name", "Value"}
- elseif (cn == "SpecialMesh") then
- _childs = {"MeshType", "Scale", "Offset"}
- elseif (cn == "Part" or cn == "SpawnLocation") then
- _childs = {"Name", "BrickColor", "Transparency", "Reflectance", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface", "Position", "Size"}
- elseif (cn == "Fire" or cn == "Smoke") then
- _childs = {"Name", "Size"}
- end
- if (#_childs > 0) then
- for i = 1,#_childs do
- pcall(function()
- local partbtn = Instance.new("TextButton", scrollframe)
- partbtn.Size = UDim2.new(0.925,0,0.025,0)
- partbtn.Position = UDim2.new(0,0,(partbtn.Size.Y.Scale*i)-partbtn.Size.Y.Scale,0)
- partbtn.BackgroundColor3 = Color3.new(0,0,0)
- partbtn.TextColor3 = Color3.new(1,1,1)
- partbtn.BorderColor3 = Color3.new(1,1,1)
- partbtn.Name = "btn_" .._childs[i]
- partbtn.Text = _childs[i]
- partbtn.MouseButton1Down:connect(function()
- if (_childs[i] == "MaxHealth" or _childs[i] == "WalkSpeed" or _childs[i] == "Health" or _childs[i] == "Transparency" or _childs[i] == "Reflectance") or (_childs[i] == "Size" and (cn == "Fire" or cn == "Smoke")) then
- showguimsg("TextBox", function(input) if isnumber(input) == true then obj[_childs[i]]=input end end, "Input " .._childs[i].. ":", obj[_childs[i]])
- elseif (_childs[i] == "Name" or _childs[i] == "BrickColor" or _childs[i] == "MeshType" or _childs[i] == "BottomSurface" or _childs[i] == "TopSurface" or _childs[i] == "LeftSurface" or _childs[i] == "RightSurface" or _childs[i] == "FrontSurface" or _childs[i] == "BackSurface") then
- showguimsg("TextBox", function(input) if isnumber(input) == false then pcall(function() obj[_childs[i]]=input end) end end, "Input " .._childs[i].. ":", tostring(obj[_childs[i]]))
- elseif (_childs[i] == "Value") and (cn == "StringValue" or cn == "ObjectValue") then
- showguimsg("TextBox", function(input) if isnumber(input) == false then pcall(function() obj[_childs[i]]=input end) end end, "Input " .._childs[i].. ":", tostring(obj[_childs[i]]))
- elseif (_childs[i] == "Source") then
- showguimsg("TextLabel", function(input) print("haha, i'm viewing your script") end, _childs[i].. ":", obj[_childs[i]])
- elseif (cn == "NumberValue" or cn == "IntValue") then
- if (_childs[i] == "Value") then
- showguimsg("TextBox", function(input) if isnumber(input) == true then obj[_childs[i]]=input end end, "Input " .._childs[i].. ":", obj[_childs[i]])
- end
- elseif (cn ~= "Smoke" and cn ~= "Fire") then
- if (_childs[i] == "Size" or _childs[i] == "Position" or _childs[i] == "Scale" or _childs[i] == "Offset") then
- showguimsg("TextBox", function(input)
- local parts = explode(", ", input)
- if parts[1] ~= nil and parts[2] ~= nil and parts[3] ~= nil then
- if isnumber(parts[1]) and isnumber(parts[2]) and isnumber(parts[3]) then
- obj[_childs[i]]=input
- end
- end
- end, "Input " .._childs[i].. " Vector3:", "X: " ..obj[_childs[i]].X.. ", Y: " ..obj[_childs[i]].Y.. ", Z: " ..obj[_childs[i]].Z.. ".")
- end
- end
- refresh(obj)
- end)
- partbtn.Name = "btn_" ..i
- partbtn.Text = _childs[i].Name.. ", Value: " ..obj[_childs[i]].. "."
- partbtn.BackgroundTransparency = frame.BackgroundTransparency
- end)
- end
- end
- end
- end
- refresh(currently_searching_in)
- local deselect = Instance.new("TextButton", sg)
- deselect.Size = UDim2.new(scrollframe.Size.X.Scale/2, 0, 0.04, 0)
- deselect.Position = UDim2.new(s_left(scrollframe),0,s_bottom(scrollframe),0)
- deselect.BorderColor3 = Color3.new(1,1,1)
- deselect.BackgroundColor3 = Color3.new(1,0,0)
- deselect.TextColor3 = Color3.new(1,1,1)
- deselect.FontSize = "Size14"
- deselect.Text = "Deselect"
- deselect.Visible = false
- deselect.MouseButton1Down:connect(f_deselect)
- local delete = Instance.new("TextButton", sg)
- delete.Size = deselect.Size
- delete.Position = UDim2.new(s_right(deselect),0,s_bottom(scrollframe),0)
- delete.BorderColor3 = Color3.new(1,1,1)
- delete.BackgroundColor3 = Color3.new(1,0,0)
- delete.TextColor3 = Color3.new(1,1,1)
- delete.FontSize = "Size14"
- delete.Visible = false
- delete.Text = "Delete"
- delete.MouseButton1Down:connect(function()
- for i=1,#selected_btn do
- selected_btn[i]:Remove()
- end
- for j=1,#selected_obj do
- selected_obj[j]:Remove()
- end
- refresh(currently_searching_in)
- end)
- local btn_back = Instance.new("TextButton", sg)
- btn_back.Size = deselect.Size
- btn_back.Position = UDim2.new(s_left(deselect),0,s_bottom(deselect),0)
- btn_back.BorderColor3 = Color3.new(1,1,1)
- btn_back.BackgroundColor3 = Color3.new(1,0,0)
- btn_back.TextColor3 = Color3.new(1,1,1)
- btn_back.FontSize = "Size14"
- btn_back.Visible = false
- btn_back.Text = "Back(.Parent)"
- btn_back.MouseButton1Down:connect(function()
- f_deselect()
- if (mode == "Explorer_PropertiesMode") then
- mode = "None"
- end
- if (currently_searching_in.Parent ~= nil) then
- currently_searching_in = currently_searching_in.Parent
- refresh(currently_searching_in)
- end
- end)
- local btn_reset = Instance.new("TextButton", sg)
- btn_reset.Size = deselect.Size
- btn_reset.Position = UDim2.new(s_right(deselect),0,s_bottom(deselect),0)
- btn_reset.BorderColor3 = Color3.new(1,1,1)
- btn_reset.BackgroundColor3 = Color3.new(1,0,0)
- btn_reset.TextColor3 = Color3.new(1,1,1)
- btn_reset.FontSize = "Size14"
- btn_reset.Visible = false
- btn_reset.Text = "Reset"
- btn_reset.MouseButton1Down:connect(function()
- f_deselect()
- mode = "dissolve"
- currently_searching_in = ws
- refresh(currently_searching_in)
- end)
- local btn_refresh = Instance.new("TextButton", frame)
- local btn_insert = Instance.new("TextButton", frame)
- local btn_explorer = Instance.new("TextButton", frame)
- btn_explorer.Size = UDim2.new(close.Position.X.Scale/2.75,0,close.Size.Y.Scale,0)
- btn_explorer.Position = UDim2.new(1-btn_explorer.Size.X.Scale,0,-close.Size.Y.Scale,0)
- btn_explorer.BackgroundColor3 = Color3.new(0,0,0)
- btn_explorer.TextColor3 = Color3.new(1,1,1)
- btn_explorer.BorderColor3 = Color3.new(1,1,1)
- btn_explorer.Name = "btn_explorer"
- btn_explorer.Text = "Show Explorer"
- btn_explorer.FontSize = "Size18"
- btn_explorer.MouseButton1Down:connect(function()
- if (scrollframe.Visible == false) then
- scrollframe.Visible = true
- btn_explorer.Text = "Hide Explorer"
- btn_refresh.Visible = true
- deselect.Visible = true
- delete.Visible = true
- btn_back.Visible = true
- btn_reset.Visible = true
- btn_insert.Visible = true
- else
- scrollframe.Visible = false
- btn_explorer.Text = "Show Explorer"
- btn_refresh.Visible = false
- deselect.Visible = false
- delete.Visible = false
- btn_back.Visible = false
- btn_reset.Visible = false
- btn_insert.Visible = false
- end
- end)
- btn_insert.Size = btn_explorer.Size
- btn_insert.Position = UDim2.new(s_right(btn_explorer),0,s_top(btn_explorer),0)
- btn_insert.BackgroundColor3 = Color3.new(1,0,0)
- btn_insert.TextColor3 = Color3.new(1,1,1)
- btn_insert.BorderColor3 = Color3.new(1,1,1)
- btn_insert.Name = "btn_insert"
- btn_insert.Text = "Insert Object"
- btn_insert.FontSize = "Size18"
- btn_insert.Visible = false
- btn_insert.MouseButton1Down:connect(function()
- if (currently_searching_in.Parent ~= nil and currently_searching_in ~= game) then
- local sf = Instance.new("ScrollingFrame", sg)
- sf.Position = UDim2.new(0.4,0,0.4,0)
- sf.Size = UDim2.new(0.2,0,0.2,0)
- local exit = Instance.new("TextButton", sg)
- exit.Position = UDim2.new(0.6,0,0.4,0)
- exit.Size = UDim2.new(0.03,0,0.03,0)
- exit.BackgroundColor3 = Color3.new(1,0,0)
- exit.TextColor3 = Color3.new(1,1,1)
- exit.BorderColor3 = Color3.new(1,1,1)
- exit.FontSize = "Size24"
- exit.Text = "X"
- exit.MouseButton1Down:connect(function() exit:Remove() sf:Remove() end)
- for i = 1, #insert_types do
- local insertbtn = Instance.new("TextButton", sf)
- insertbtn.Size = UDim2.new(0.925,0,0.025,0)
- insertbtn.Position = UDim2.new(0,0,(insertbtn.Size.Y.Scale*i)-insertbtn.Size.Y.Scale,0)
- insertbtn.BackgroundColor3 = Color3.new(0,0,0)
- insertbtn.TextColor3 = Color3.new(1,1,1)
- insertbtn.BorderColor3 = Color3.new(1,1,1)
- insertbtn.Name = "btn_" ..insert_types[i]
- insertbtn.Text = insert_types[i]
- insertbtn.BackgroundTransparency = frame.BackgroundTransparency
- insertbtn.MouseButton1Down:connect(function()
- Instance.new(insert_types[i], currently_searching_in)
- refresh(currently_searching_in)
- exit:Remove()
- sf:Remove()
- end)
- end
- end
- end)
- btn_refresh.Size = UDim2.new(btn_explorer.Size.X.Scale,0,close.Size.Y.Scale,0)
- btn_refresh.Position = UDim2.new(1-btn_explorer.Size.X.Scale,0,-(btn_explorer.Size.Y.Scale+btn_refresh.Size.Y.Scale),0)
- btn_refresh.BackgroundColor3 = Color3.new(1,0,0)
- btn_refresh.TextColor3 = Color3.new(1,1,1)
- btn_refresh.BorderColor3 = Color3.new(1,1,1)
- btn_refresh.Name = "Btn_Refresh"
- btn_refresh.Visible = false
- btn_refresh.Text = "Refresh"
- btn_refresh.FontSize = "Size18"
- btn_refresh.MouseButton1Down:connect(function() refresh(currently_searching_in) end)
- local _maxcols = 14
- local _cols = 1
- local _rows = 1
- for _i = 1,#modes do
- local _xsize = frame.Size.X.Scale/3
- local modebtn = Instance.new("TextButton", frame)
- modebtn.Size = UDim2.new(_xsize, 0, 0.06, 0)
- modebtn.Position = UDim2.new((_xsize * _rows) - _xsize,0,caption.Size.Y.Scale + (modebtn.Size.Y.Scale * _cols) - modebtn.Size.Y.Scale,0)
- modebtn.BackgroundColor3 = Color3.new(0,0,0)
- modebtn.TextColor3 = Color3.new(1,1,1)
- modebtn.BorderColor3 = Color3.new(1,1,1)
- modebtn.Name = "button_" ..modes[_i]
- modebtn.Text = modes[_i]
- modebtn.BackgroundTransparency = frame.BackgroundTransparency
- modebtn.MouseButton1Down:connect(function()
- for _,v in pairs(frame:GetChildren()) do
- if (string.match(v.Name:lower(), "button_")) then
- v.BackgroundColor3 = Color3.new(0,0,0)
- end
- end
- if (mode ~= modes[_i]) then
- mode = modes[_i]
- modebtn.BackgroundColor3 = Color3.new(1,0,0)
- else
- mode = "None"
- end
- end)
- if (_cols < _maxcols) then
- _cols = _cols + 1
- else
- _cols = 1
- _rows = _rows + 1
- end
- end
- local input = Instance.new("TextBox", frame)
- input.Size = UDim2.new(0.8,0,0.06,0)
- input.Position = UDim2.new(0,0,1-input.Size.Y.Scale,0)
- input.BackgroundTransparency = frame.BackgroundTransparency
- input.Name = "INPUT"
- input.Text = "Input Here"
- input.BackgroundColor3 = Color3.new(0,0,0)
- input.BorderColor3 = Color3.new(1,1,1)
- input.TextColor3 = Color3.new(1,1,1)
- open.MouseButton1Down:connect(function()
- open.Visible = false
- frame.Visible = true
- frame.Size = UDim2.new(0.6,0,0.6,0)
- frame.Position = UDim2.new(0.05,0,0.25,0)
- end)
- close.MouseButton1Down:connect(function()
- open.Visible = true
- frame.Visible = false
- frame.Size = UDim2.new(0,0,0,0)
- frame.Position = UDim2.new(0,0,0,0)
- deselect.Visible = false
- delete.Visible = false
- btn_back.Visible = false
- scrollframe.Visible = false
- btn_explorer.Text = "Show Explorer"
- btn_refresh.Visible = false
- btn_reset.Visible = false
- btn_insert.Visible = false
- end)
- local function explode(divider, text)
- if text == nil or divider == nil then return {} end
- if tostring(text) == "" then return {} end
- if tostring(divider) == "" then return {text} end
- local text = tostring(text)
- local divider = tostring(divider)
- local position = 0
- local words = {}
- for start, stop in function() return string.find(text, divider, position, true) end do
- table.insert(words, string.sub(text, position, start - 1))
- position = stop + 1
- end
- table.insert(words, string.sub(text, position))
- return words
- end
- local execute = Instance.new("TextButton", frame)
- execute.Size = UDim2.new(0.2,0,input.Size.Y.Scale,0)
- execute.Position = UDim2.new(input.Size.X.Scale,0,1-input.Size.Y.Scale,0)
- execute.BackgroundColor3 = Color3.new(0,0,0)
- execute.BorderColor3 = Color3.new(1,1,1)
- execute.TextColor3 = Color3.new(1,1,1)
- execute.BackgroundTransparency = frame.BackgroundTransparency
- execute.Text = "Execute"
- execute.Name = "EXECUTE"
- execute.MouseButton1Down:connect(function()
- local plr = {}
- local parts = explode(", ", input.Text) or ""
- if (input.Text:lower() == "all" or parts[1] == "all") then
- for _,v in pairs(plrs:GetChildren()) do
- table.insert(plr, v.Name)
- end
- elseif (input.Text:lower() == "others" or parts[1] == "others") then
- for _,v in pairs(plrs:GetChildren()) do
- if (v.Name ~= User.Name) then
- table.insert(plr, v.Name)
- end
- end
- elseif (input.Text:lower() == "me" or parts[1] == "me") then
- table.insert(plr, User.Name)
- else
- for _,v in pairs(plrs:GetChildren()) do
- if (string.find(v.Name:lower(), input.Text:lower()) or string.find(v.Name:lower(), parts[1]:lower())) then
- table.insert(plr, v.Name)
- end
- end
- end
- if (mode:lower() == "ff") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- Instance.new("ForceField", p.Character)
- end
- end
- end
- elseif (mode:lower() == "unff") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- for _,v in pairs(p.Character:GetChildren()) do
- if (v.ClassName == "ForceField") then
- v:Remove()
- end
- end
- end
- end
- end
- elseif (mode:lower() == "invisible") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- for _,v in pairs(p.Character:GetChildren()) do
- if (v.ClassName == "Part") then v.Transparency=1
- elseif (v.ClassName == "Hat" and v:findFirstChild("Handle")) then v.Handle.Transparency=1 end
- if (v:findFirstChild("face")) then v.face.Transparency=1 end
- end
- end
- end
- end
- elseif (mode:lower() == "visible") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- for _,v in pairs(p.Character:GetChildren()) do
- if (v.Name ~= "HumanoidRootPart") then
- if (v.ClassName == "Part") then v.Transparency=0
- elseif (v.ClassName == "Hat" and v:findFirstChild("Handle")) then v.Handle.Transparency=0 end
- if (v:findFirstChild("face")) then v.face.Transparency=0 end
- end
- end
- end
- end
- end
- elseif (mode:lower() == "kill") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- p.Character:BreakJoints()
- end
- end
- end
- elseif (mode:lower() == "kick") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then p:Remove() end
- end
- elseif (mode:lower() == "god") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.MaxHealth = math.huge
- end
- end
- end
- end
- elseif (mode:lower() == "script") then
- xpcall(function()
- loadstring(input.Text)()
- end, function(Error)
- showmsg(Error, 3)
- end)
- elseif (mode:lower() == "teleport") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- User.Character:MoveTo(t.Position)
- end
- end
- end
- end
- elseif (mode:lower() == "freeze") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- t.Anchored = true
- end
- end
- end
- end
- elseif (mode:lower() == "thaw") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- t.Anchored = false
- end
- end
- end
- end
- elseif (mode:lower() == "rejoin") then
- game:GetService("TeleportService"):Teleport(game.PlaceId)
- elseif (mode:lower() == "clean") then
- local base = Instance.new("SpawnLocation", ws)
- base.BrickColor = BrickColor.new("Camo")
- base.FormFactor = "Plate"
- base.Size = Vector3.new(500,0.4,500)
- base.BottomSurface = "Smooth"
- base.TopSurface = "Smooth"
- base.Material = "Grass"
- base.Name = "Base"
- base.Locked = true
- base.Anchored = true
- base.CFrame = CFrame.new(0,0,0)
- for _,v in pairs(ws:GetChildren()) do
- if (v.Archivable == true and v.Name ~= "Camera" and v.ClassName ~= "Terrain" and v ~= base) then
- v:Remove()
- end
- end
- elseif (mode:lower() == "base") then
- local base = Instance.new("SpawnLocation", ws)
- base.BrickColor = BrickColor.new("Camo")
- base.FormFactor = "Plate"
- base.Size = Vector3.new(500,0.4,500)
- base.BottomSurface = "Smooth"
- base.TopSurface = "Smooth"
- base.Material = "Grass"
- base.Name = "Base"
- base.Locked = true
- base.Anchored = true
- base.CFrame = CFrame.new(0,0,0)
- for _,v in pairs(ws:GetChildren()) do
- if (v ~= base) then
- if ((v.Name == "Base") or (v.Size.X>100 and v.Size.Y<2 and v.Size.Z>100)) then
- v:Remove()
- end
- end
- end
- elseif (mode:lower() == "explode") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- Instance.new("Explosion", ws).Position = t.Position
- end
- end
- end
- end
- elseif (mode:lower() == "antigrav") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- local bf = t:findFirstChild("BodyForce") or Instance.new("BodyForce", t)
- bf.force = Vector3.new(0,0,0)
- for _,v in pairs(p.Character:GetChildren()) do
- if (v.ClassName == "Part") then
- bf.force = bf.force + Vector3.new(0,v:GetMass()*80,0)
- elseif (v.ClassName == "Hat" and v:findFirstChild("Handle")) then
- bf.force = bf.force + Vector3.new(0,v.Handle:GetMass()*80,0)
- end
- end
- end
- end
- end
- end
- elseif (mode:lower() == "grav") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local t = p.Character:findFirstChild("Torso")
- if (t ~= nil) then
- for _,v in pairs(t:GetChildren()) do
- if (v.ClassName == "BodyForce") then
- v:Remove()
- end
- end
- end
- end
- end
- end
- elseif (mode:lower() == "respawn") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then p:LoadCharacter() end
- end
- elseif (mode:lower() == "time" and isnumber(input.Text) == true) then
- game.Lighting.TimeOfDay = input.Text
- elseif (mode:lower() == "brightness" and isnumber(input.Text) == true) then
- game.Lighting.Brightness = input.Text
- elseif (mode:lower() == "fog" and isnumber(input.Text) == true) then
- game.Lighting.FogEnd = input.Text
- elseif (mode:lower() == "ambience") then
- if (#parts > 2) then
- if (isnumber(parts[1])==true and isnumber(parts[2])==true and isnumber(parts[3])==true) then
- game.Lighting.Ambient = Color3.new(parts[1], parts[2], parts[3])
- end
- end
- elseif (mode:lower() == "unpunish") then
- for _,v in pairs(game.Lighting:GetChildren()) do
- if (string.find(v.Name:lower(), input.Text:lower())) then
- v.Parent = ws
- v:MakeJoints()
- end
- end
- elseif (mode:lower() == "run") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.WalkSpeed = 75
- end
- end
- end
- end
- elseif (mode:lower() == "walk") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.WalkSpeed = 16
- end
- end
- end
- end
- elseif (mode:lower() == "jump") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.Jump = true
- end
- end
- end
- end
- elseif (mode:lower() == "sit") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.Sit = true
- end
- end
- end
- end
- elseif (mode:lower() == "mortal") then
- for i=1,#plr do
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil) then
- if (p.Character ~= nil) then
- local h = p.Character:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.MaxHealth = 100
- end
- end
- end
- end
- elseif (mode:lower() == "message" and parts[1] ~= nil and parts[2] ~= nil and parts[3] ~= nil) then
- for i=1,#plr do --[[ also searches parts[1] if it cant find normally find the player ]]
- local p = plrs:findFirstChild(plr[i])
- if (p ~= nil and isnumber(parts[2])==false and isnumber(parts[3])==true) then
- local m = Instance.new("Message", p.PlayerGui)
- m.Text = parts[2]
- if (parts[3] < 20) then
- delay(parts[3], function() m:remove() end)
- else
- delay(20, function() m:remove() end)
- end
- end
- end
- end
- end)
- local tool = Instance.new("Tool", User.Backpack)
- tool.GripUp = Vector3.new(0,1.4,0)
- tool.Name = "Wieldeth"
- local handle = Instance.new("Part", tool)
- handle.BrickColor = BrickColor.new("Black")
- handle.Size = Vector3.new(1,4,1)
- handle.Name = "Handle"
- handle.BottomSurface = Enum.SurfaceType.Smooth
- handle.TopSurface = Enum.SurfaceType.Smooth
- local ball = Instance.new("Part", tool)
- ball.BrickColor = BrickColor.new("Bright red")
- ball.BottomSurface = Enum.SurfaceType.Smooth
- ball.TopSurface = Enum.SurfaceType.Smooth
- ball.Shape = "Ball"
- ball.Name = "Ball"
- ball.Size = Vector3.new(1,1,1)
- local cm = Instance.new("CylinderMesh", handle)
- cm.Scale = Vector3.new(0.5,1,0.5)
- local sm1 = Instance.new("SpecialMesh", ball)
- sm1.MeshType = "Sphere"
- local pl = Instance.new("PointLight", handle)
- local function lasso(point)
- if (User.Character ~= nil) then
- local hum = User.Character:findFirstChild("Humanoid")
- if (hum ~= nil) then
- local spl = Instance.new("SelectionPointLasso", User.Character)
- spl.Humanoid = hum
- spl.Point = point
- delay(1, function() spl:Remove() end)
- end
- end
- end
- tool.Equipped:connect(function(mouse)
- local weld = Instance.new("Weld", handle)
- weld.Part0 = handle
- weld.Part1 = ball
- weld.C0 = CFrame.new(0,((handle.Size.Y/2+ball.Size.Y)-1),0)
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if (key == "p") then
- platforming = not platforming
- elseif (key == "h") then
- hovermode = not hovermode
- end
- end)
- mouse.Button1Down:connect(function()
- local target = mouse.Target
- local t = User.Character:findFirstChild("Torso")
- if (target ~= nil and target.Parent ~= nil and t ~= nil) then
- lasso(mouse.Hit.p)
- if (mode:lower() == "dissolve" and target.Size.X<20 and target.Size.Y<20 and target.Size.Z<20) then
- target.BrickColor = BrickColor.new("Black")
- for i=1,10 do
- target.Transparency = i*0.1
- wait(0.05)
- end
- target:Remove()
- end
- if (mode:lower() == "ff" and target.Parent.ClassName == "Model" and target.Parent:findFirstChild("Humanoid")) then
- Instance.new("ForceField", target.Parent)
- end
- if (mode:lower() == "unff" and target.Parent.ClassName == "Model" and target.Parent:findFirstChild("Humanoid")) then
- for _,v in pairs(target.Parent:GetChildren()) do
- if (v.ClassName == "ForceField") then
- v:Remove()
- end
- end
- elseif (mode:lower() == "kill" and target.Parent.ClassName == "Model") then
- target.Parent:BreakJoints()
- elseif (mode:lower() == "kick" and target.Parent.ClassName == "Model") then
- local p = plrs:GetPlayerFromCharacter(target.Parent)
- if (p ~= nil) then
- p:Remove()
- end
- elseif (mode:lower() == "god" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.MaxHealth = math.huge
- elseif (mode:lower() == "mortal" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.MaxHealth = 100
- elseif (mode:lower() == "run" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.WalkSpeed = 75
- elseif (mode:lower() == "walk" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.WalkSpeed = 16
- elseif (mode:lower() == "jump" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.Jump = true
- elseif (mode:lower() == "sit" and target.Parent:findFirstChild("Humanoid") ~= nil) then
- target.Parent.Humanoid.Sit = true
- elseif (mode:lower() == "teleport" and (t.Position-mouse.Hit.p).magnitude < 125) then
- User.Character:MoveTo(mouse.Hit.p)
- elseif (mode:lower() == "delete" and target.Size.X<20 and target.Size.Y<20 and target.Size.Z<20) then
- target:Remove()
- elseif (mode:lower() == "freeze") then
- if (target.Parent:findFirstChild("Torso")) then
- target.Parent.Torso.Anchored = true
- target.Parent.Torso.Reflectance = 0.8
- else
- target.Anchored = true
- target.Reflectance = 0.8
- end
- elseif (mode:lower() == "thaw") then
- if (target.Parent:findFirstChild("Torso")) then
- target.Parent.Torso.Anchored = false
- target.Parent.Torso.Reflectance = 0
- else
- target.Anchored = false
- target.Reflectance = 0
- end
- elseif (mode:lower() == "explode") then
- Instance.new("Explosion", ws).Position = mouse.Hit.p
- elseif (mode:lower() == "antigrav") then
- local t = target.Parent:findFirstChild("Torso")
- if (t ~= nil) then
- local bf = t:findFirstChild("BodyForce") or Instance.new("BodyForce", t)
- bf.force = Vector3.new(0,0,0)
- for _,v in pairs(target.Parent:GetChildren()) do
- if (v.ClassName == "Hat") then
- bf.force = bf.force + Vector3.new(0,v:GetMass()*80,0)
- end
- end
- else
- local bf = t:findFirstChild("BodyForce") or Instance.new("BodyForce", target)
- bf.force = Vector3.new(0,2500,0)
- end
- elseif (mode:lower() == "grav") then
- local t = target.Parent:findFirstChild("Torso")
- if (t ~= nil) then
- for _,v in pairs(t:GetChildren()) do
- if (v.ClassName == "BodyForce") then
- v:Remove()
- end
- end
- else
- for _,v in pairs(target:GetChildren()) do
- if (v.ClassName == "BodyForce") then
- v:Remove()
- end
- end
- end
- elseif (mode:lower() == "color") then
- if (input.Text == "random") then
- target.BrickColor = BrickColor.random()
- else
- pcall(function()
- target.BrickColor = BrickColor.new(input.Text)
- end)
- end
- elseif (mode:lower() == "respawn" and target.Parent.ClassName == "Model" and target.Parent:findFirstChild("Humanoid")) then
- respawn(target.Parent)
- elseif (mode:lower() == "invisible" and target.Parent.ClassName == "Model") then
- for _,v in pairs(target.Parent:GetChildren()) do
- if (v.ClassName == "Part") then v.Transparency=1
- elseif (v.ClassName == "Hat" and v:findFirstChild("Handle")) then v.Handle.Transparency=1 end
- if (v:findFirstChild("face")) then v.face.Transparency=1 end
- end
- elseif (mode:lower() == "visible" and target.Parent.ClassName == "Model") then
- for _,v in pairs(target.Parent:GetChildren()) do
- if (v.Name ~= "HumanoidRootPart") then
- if (v.ClassName == "Part") then v.Transparency=0
- elseif (v.ClassName == "Hat" and v:findFirstChild("Handle")) then v.Handle.Transparency=0 end
- if (v:findFirstChild("face")) then v.face.Transparency=0 end
- end
- end
- elseif (mode:lower() == "punish" and target.Parent.ClassName == "Model" and target.Parent:findFirstChild("Humanoid")) then
- target.Parent.Parent = game.Lighting
- elseif (mode:lower() == "m" and target.Parent.ClassName == "Model") then
- local p = plrs:GetPlayerFromCharacter(target.Parent)
- local parts = explode(", ", input.Text)
- if (p ~= nil and parts[1] ~= nil and parts[2] ~= nil) then
- if (p:findFirstChild("PlayerGui") and isnumber(parts[1]) == false and isnumber(parts[2]) == true) then
- local m = Instance.new("Message", p.PlayerGui)
- m.Text = parts[1]
- if (parts[2] < 20) then
- delay(parts[2], function() m:remove() end)
- else
- delay(20, function() m:remove() end)
- end
- end
- end
- end
- end
- end)
- end)
- ball.Touched:connect(function(hit)
- if (hit.Parent ~= nil) then
- if (hit.Parent ~= User.Character and hitDeb == false) then
- if ((hit.Size.X < 20) and (hit.Size.Y < 20) and (hit.Size.Z < 20)) then
- hitDeb = true
- hit.BrickColor = BrickColor.new("Really black")
- for i = 1,10 do
- hit.Transparency = i*0.1
- wait(0.05)
- end
- hit:Remove()
- wait(0.1)
- hitDeb = false
- end
- end
- end
- end)
- local _a = 1
- local _b = 1
- local _c = false
- local disable = false
- local char = plrs.LocalPlayer.Character
- if (char ~= nil) then
- local h = char:findFirstChild("Humanoid")
- if (h ~= nil) then
- h.Died:connect(function()
- disable = true
- renderstep_con:disconnect()
- char.Parent = Game:GetService("Lighting")
- char:MakeJoints()
- h.MaxHealth = 100
- h.Health = h.MaxHealth
- wait(0.1)
- char.Parent = ws
- h.Health = h.MaxHealth
- char:MakeJoints()
- end)
- end
- end
- renderstep_con = Game:GetService("RunService").RenderStepped:connect(function()
- if (ball.Parent ~= nil and sm1.Parent ~= nil) or disable == false then
- caption.Text = "Current Mode: " ..mode.. "."
- if (platforming == true) then
- platform.BrickColor = BrickColor.new("White")
- platform.Parent = ws
- platform.Anchored = true
- platform.Locked = true
- platform.FormFactor = "Plate"
- platform.Size = Vector3.new(10,0.4,10)
- platform.BottomSurface = 1
- platform.TopSurface = 1
- if (platform:findFirstChild("CylinderMesh") == nil) then
- Instance.new("CylinderMesh", platform)
- end
- if (char ~= nil) then
- local t = char:findFirstChild("Torso")
- local hum = char:findFirstChild("Humanoid")
- if (t ~= nil) then
- if hovermode == false then
- platform.CFrame = CFrame.new(t.Position.X, t.Position.Y - 3.5, t.Position.Z)
- else
- platform.CFrame = CFrame.new(t.Position.X, platform.Position.Y, t.Position.Z)
- end
- end
- if (hum ~= nil) then
- hum.Health = hum.MaxHealth
- end
- end
- else
- platform.Parent = Game:GetService("Lighting")
- end
- --[[ Create a variable-based timer to add some fading effects. ]]
- if (_a < 2) then
- _a = _a + 1
- else
- _a = 0
- _b = _b + 0.1
- if (c == false) then
- ball.Transparency = ball.Transparency + 0.1
- ball.Reflectance = ball.Reflectance + 0.1
- sm1.Scale = sm1.Scale + Vector3.new(0.05,0.05,0.05)
- platform.Transparency = platform.Transparency + 0.06
- platform.Reflectance = platform.Reflectance + 0.06
- else
- ball.Transparency = ball.Transparency - 0.1
- ball.Reflectance = ball.Reflectance - 0.1
- sm1.Scale = sm1.Scale - Vector3.new(0.05,0.05,0.05)
- platform.Transparency = platform.Transparency - 0.06
- platform.Reflectance = platform.Reflectance + 0.06
- end
- end
- if (_b > 1) then
- _b = 0
- if (c == false) then c = true else c = false end
- elseif (_b < 0) then
- _b = 0
- if (c == false) then c = true else c = false end
- end
- end
- end)
- end --[[ End of BEGININTERFACE function ]]
- BEGININTERFACE()
- plrs.LocalPlayer.CharacterAdded:connect(BEGININTERFACE)
- --[[plrs.PlayerAdded:connect(function(newplayer)
- if (newplayer.Name == user_name) then
- BEGININTERFACE()
- newplayer.CharacterAdded:connect(BEGININTERFACE)
- end
- end)]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement