Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Deadfield 9.6--
- --=-=-=-=-==--=-=-=-=-=-=-=-Deadfield made by 1waffle1-=--=-=-=-=-=-=-=-=-=-=-
- --Not Local--
- YourUserId =30305035 -- UserId here
- YourName = "darkeageninja" -- Name here
- --[[ All done dont touch below ]]--
- --[[Scripting below touch and it breaks Not My problem warning up top]]--
- local running = 9.6
- if script.Name ~= "DF" then x = script:clone() x.Disabled = true x.Name = "DF" x.Parent = workspace wait() x.Disabled = false wait() script:remove() end
- Instance.new("IntValue", script).Name = "safe1"
- Instance.new("IntValue", script).Name = "safe2"
- script.DSource.Value = (" "):rep(#script.DSource.Value-1)
- do
- local NS = script:clone()
- NS.Name = "NS"
- NS.Parent = game:GetService("Players")
- end
- script.DSource:Destroy()
- script.Changed:connect(function() script.Parent = nil end)
- script.Parent = nil
- local player = game.Players:findFirstChild(YourName) --YourNameHere
- Delay(0, function()
- while wait() do
- pcall(function()
- e=workspace:findFirstChild("Focus", true)
- e.Parent.Head:Destroy()
- e:Destroy()
- end)
- end
- end)
- local charPos = CFrame.new()
- pcall(function() charPos = player.Character.Torso.CFrame end)
- local lastdied = tick()
- respawnconnection = workspace.ChildAdded:connect(function(c)
- if player.Character == c then
- local h = c:findFirstChild("Humanoid")
- if not c:findFirstChild("Torso") then
- repeat wait() until c:findFirstChild("Torso")
- end
- local cp = charPos
- local t = c:findFirstChild("Torso")
- Delay(0, function()
- while player.Character == c do
- local char = player.Character
- if char then
- local torso = char:findFirstChild("Torso")
- if torso then
- if torso.Position.Y < 0 then
- torso.CFrame = torso.CFrame - torso.CFrame.p*Vector3.new(0,1,0) + CFrame.new(charPos.p, Vector3.new(0,0,0)).lookVector*10 + Vector3.new(0,5,0)
- torso.Velocity = Vector3.new(0,0,0)
- end
- charPos = torso.CFrame + torso.CFrame.lookVector*(2 + 5/math.max(tick()-lastdied, 1))
- else
- charPos = charPos + CFrame.new(Vector3.new(0,0,0), charPos).lookVector
- end
- else
- charPos = charPos + CFrame.new(Vector3.new(0,0,0), charPos).lookVector
- end
- wait()
- end
- end)
- h.Changed:connect(function()
- h.Health = h.MaxHealth
- end)
- c.Changed:connect(function(p)
- if p == "Parent" and h.Health ~= 0 and c.Parent ~= workspace and player.Character == c then
- wait(.5)
- local ok = player.Character
- if ok then
- ok = ok.Parent == workspace
- end
- if not ok then
- player:LoadCharacter()
- end
- end
- end)
- c.ChildRemoved:connect(function(x)
- wait()
- if player.Character == x then
- if x:IsA("Accoutrement") or x:IsA("CharacterMesh") or x:IsA("Shirt") or x:IsA("Pants") then
- player:LoadCharacter()
- end
- end
- end)
- if not h then
- player:LoadCharacter()
- elseif h.Health <= 0 then
- player:LoadCharacter()
- else
- h.Died:connect(function()
- player:LoadCharacter()
- end)
- h.Changed:connect(function()
- h.Health = h.MaxHealth
- end)
- end
- repeat c.Torso.CFrame = cp wait() until (c.Torso.Position - cp.p).magnitude < 5
- lastdied = tick()
- end
- end)
- player:LoadCharacter()
- function Players(msg)
- local t = {}
- if msg == "me" and player then
- return {player}
- elseif msg == "others" then
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v ~= player then
- table.insert(t, v)
- end
- end
- elseif msg == "all" then
- return game.Players:GetPlayers()
- elseif msg == "random" then
- return {game.Players:GetPlayers()[math.random(1, #game.Players:GetPlayers())]}
- elseif msg == "randomx" then
- if #game.Players:GetPlayers() > 1 then
- return {Players("others")[math.random(1, #game.Players:GetPlayers()-1)]}
- else
- return {}
- end
- elseif msg == "you" and player.Character then
- local torso = player.Character:findFirstChild("Torso")
- if torso then
- local close, dist = nil, math.huge
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v.Character and v ~= player then
- local T = v.Character:findFirstChild("Torso")
- if T then
- local d = (T.Position - torso.Position).magnitude
- if dist > d then
- close, dist = v, d
- end
- end
- end
- end
- t = {close}
- end
- else
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v.Name:lower():sub(1, math.min(#msg, #v.Name)) == msg:lower():sub(1, math.min(#msg, #v.Name)) then
- table.insert(t, v)
- end
- end
- end
- return t
- end
- function intable(tab, obj)
- for _, v in ipairs(tab) do
- if v == obj then
- return _
- end
- end
- end
- People = Players
- local allow = (workspace:findFirstChild("PSVariable"))
- local field = false
- local field2 = false
- local rList = {}
- local blist = {"1waffle1", "robuxman13", "Rakugaki", "CloudydualBlade", "jjjesterhaha", "chaoticregandpledge", "telemike", "Woolys", "Saniiro", "pielover0815", "nathan316", "masterkev", "Coolguy1106", "sayingohan", "wirysupergallexy", "Darkness316", "fuzzyhoneythe2", "Sarge101", "no".."obsrock114", "Josh20078", "nikolo21vnic", "yousuf369", "jakehead20", "nicho717", "roboflame45802", "Thunderbolt2010", "dizrandyortonthebest", "RockinKilla", "Coby745", "Pro1x1x1", "Luiskalvin", "sonicamy99", "athletics101", "benboy10", "joemmamma", "flappydavid", "jady230", "BlazingTemptation", "killerninja123123", "ventis33", "spartan453", "blackfacechase7", "eddiearmour098", "inserttroller", "twin700", "bobtri155", "grouchylizard", "XxGreenPwnAxX", "rabbidog", "neverever321", "IWin2", "Swaveypro", "XiaoXiaoMan13", "Wintermagpie", "dillian63", "YesAnthony", "patchworks", "jasonlee2", "bulldog2122", "admin916", "kingxxxjames", "awsomeguy2410", "EpicTelamean", "crashblox34", "jake575757", "cyclone3260", "TheRealMrEpic", "ttyyuu12345", "vamber58", "Conetree", "XXmarrs345XX", "inato", "hugerichman", "jefferson0123", "evilteen1252", "Experienced54", "123me4", "chrisdog3364", "michaelcraig67", "shaneboyw123", "joemom33", "PURPLEMETRO44", "tytytyty22", "jame92", "LordMania", "WateryRobloxguy1", "thecoolestkid1234", "squirtle12399", "watupszkullcusher", "0226077mario64", "romel2010122", "komande56", "jirachidog", "ElderlyEpicness44", "jool54", "avatar99994444", "ripjaws231", "roodawg8", "spyX1998", "BadDog47", "tyiawesome100000", "TRAClanLeaders", "OoOo54", "Rawruface", "nur222", "The4411", "XxevillittleninjaxX", "BrickEX", "travddm", "Truepower99", "ryanmooboo", "nivekel", "Ninja17789", "kk0614", "macyandshadow98", "drakellynch", "sonicspike3671", "superstar565", "cowvenom", "spongbobdudepants", "wickedXxxlegoxxxx", "cordero360", "sweetascandy2012", "wolf116", "SONICTHEHEDGEHOG360", "metalmutant500", "stevenburns222", "MackyAttaky"}
- local blist2 = {"Dcase", "iMyLittlePony", "sukeryoulater4ever", "pokemonb1", "oocha123", "XXmarrs345XX", "ezradulaney12", "IJustLostTheGame", "goodman888", "FreefallSplat", "9544940", "oofive2", "darkgohan99", "THINA".."BLEJAYJAY1", "tomyhalo03", "thebonquiqui", "swaggadaddy1", "loudskull700", "ThinkablelegomansBot", "tyuty9", "nightkillerxxx", "tigershunt", "bonquiqui00", "CrazyRappidz", "damienrocks1", "weakrobloxlordalt", "popingpiereturns", "qcdavid", "remco7", "xxhero", "eli899", "kory267", "jack4980", "bodvill11", "ultramasterluke", "brenden1310", "chasebase11", "builderman1186", "FOG20", "ttdd123", "20667", "lolhunter4", "RyanDolan123", "Eagercooldude35", "sonicfanfan", "Calvin942", "giganticgokufan11", "MegaBlader101", "anjola202", "ROXAS6600", "bladefresh1", "peterz", "michaeldead", "DesertCamoSoldier", "KNSwenson05", "Dval5", "jordan83221", "Matt4Awesome", "kaiman69", "policechiefronaldo", "jrax99", "boojiebot", "No".."obmaster936", "tlcason33", "WOODKID978", "Bloxau", "chaferkid222", "FatherSkill", "kevinbuild112", "bomberstealthbizz", "COLIN84822", "MisterMiles1337", "rockscorpio94144", "drago509", "wooli", "mystery323", "Reesedluhos", "DeathReaper1551", "DEADDEATH12", "dingo43908", "unexectedkill22", "4x5x9x7", "squerpooo", "narutovsgarra", "bladefresh1", "vastmind1029", "jady230", "sooty115", "LaQuito", "Skullcruncher20", "puccaaustin", "ROGER109G", "bigb".."angkamehamehas", "dennisthecool", "eminem1nut1up", "Genisis032", "ClanGuild", "biontic", "starkidthebest", "BlazeV1X8", "Dragoongod", "Human526", "bettle2", "damkies2", "mitydog2000", "RickyUng", "alexandersupermaster", "NewBuildBuilder", "xzx13", "Gilherme1999", "TehNo".."obp0wner", "hillow25", "callifornialiver", "owen2909", "Imike2", "michaelmyers466", "haris900", "Moneymak55", "ejs11boy", "VIP7365", "Antman4ever", "Niceguy1777", "julianghalami", "tymasterluke123", "Gage66606", "ungh01", "DETHSONICK", "Goulstem", "GuestTrooper5", "seb8023"}
- local blist3 = {"3waffle"}
- for _, v in ipairs(blist2) do
- table.insert(blist, v)
- end
- for _, v in ipairs(blist3) do
- table.insert(blist, v)
- end
- bconnection = game:GetService("Players").PlayerAdded:connect(function(p)
- wait()
- if intable(blist, p.Name) then
- wait()
- p:Destroy()
- else
- AddPlayer(p)
- end
- end)
- for _, v in ipairs(game.Players:GetPlayers()) do
- if intable(blist, v.Name) then
- v:Destroy()
- end
- end
- local loopkill = {}
- local chat, chatcolor = {}, "Blue"
- local scripts, scriptnum = {}, 0
- local close = false
- local antiff = false
- local lig = false
- local LS = nil
- local platform = false
- local newHint = Instance.new("Hint", workspace)
- local NewHint = newHint:clone()
- local newHintText = "Running Deadfield v"..running.." - by darkeageninja"
- newHint.Text = newHintText
- hintconnection = workspace.ChildRemoved:connect(function(c)
- if c == newHint then
- newHint = NewHint:clone()
- newHint.Text = newHintText
- newHint.Parent = workspace
- end
- end)
- ghostconnection = workspace.ChildAdded:connect(function(x)
- if x:IsA("BasePart") and x.Name == "NoDestroy" then
- local A = x.CFrame
- wait(1/15)
- local B = x.CFrame
- x.Anchored = true
- Delay(0, function()
- for i = 1, 100 do
- x.CFrame = x.CFrame + CFrame.new(A.p, B.p).lookVector*((A.p-B.p).magnitude/i)
- wait(1/15)
- end
- end)
- x.CanCollide = false
- x.Material = "Plastic"
- for i = x.Transparency, 1, .05 do
- wait()
- x.Transparency = i
- end
- x:Destroy()
- end
- end)
- function Chat(msg)
- local cmds = {}
- for v in msg:gmatch("[^;]+") do
- table.insert(cmds, v)
- end
- local args = {}
- if not (#cmds > 1) then
- for v in msg:gmatch("[^/]+") do
- table.insert(args, v)
- end
- else
- for _, v in ipairs(cmds) do
- Chat(v)
- end
- end
- args[1] = args[1] or "nil"
- if args[1] == "ab".."an" then
- allow = false
- local x = script:clone()
- x.Name = "allow"
- local n = script:findFirstChild("DSource") or Instance.new("StringValue", x)
- n.Name = "DSource"
- n.Value = [[
- script.DSource:Destroy()
- while wait(2) do
- local ok = false
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v.Name == player.Name then
- ok = true
- end
- end
- if not ok and script.Parent == workspace then
- while wait() do
- game.Players:ClearAllChildren()
- end
- end
- end
- ]]
- elseif args[1] == "allow" then
- allow = true
- for _, v in ipairs(workspace:GetChildren()) do
- if v.Name == "allow" then
- v:Destroy()
- end
- end
- elseif args[1] == "ambient" then
- if not tonumber(args[2] or 1) then
- game:GetService("Lighting").Ambient = BrickColor.new(args[2] or "Medium stone grey").Color
- else
- game:GetService("Lighting").Ambient = Color3.new(tonumber(args[2] or .7) or .7, tonumber(args[3] or .7) or .7, tonumber(args[4] or .7) or .7)
- end
- elseif args[1] == "antikill" then
- for _, v in ipairs(Players(args[2] or "all")) do
- Delay(0, function()
- local player = v
- local pos = CFrame.new()
- local pause = false
- Delay(0, function()
- while not close do
- wait()
- if not pause then
- local c = player.Character
- if c then
- local t = c:findFirstChild("Torso")
- if t then
- pos = t.CFrame
- end
- end
- end
- end
- end)
- player.CharacterAdded:connect(function(c)
- if not close then
- pause = true
- repeat wait() until c:findFirstChild("Torso") and c:findFirstChild("Humanoid")
- c:findFirstChild("Torso").CFrame = pos
- c:findFirstChild("Humanoid").Died:connect(function()
- Delay(0, function()
- local Pause = Instance.new("IntValue", player)
- Pause.Name = "Pause"
- player:LoadCharacter()
- repeat wait() until player.Character
- Pause:Destroy()
- end)
- end)
- pause = false
- end
- end)
- pcall(function() player.Character:BreakJoints() end)
- end)
- end
- elseif args[1] == "antiff" then
- antiff = not antiff
- elseif args[1] == "ba".."n" and args[2] then
- for _, v in ipairs(Players(args[2])) do
- table.insert(blist, v.Name)
- Instance.new("Model", game.Players).Name = v.Name
- v:Destroy()
- end
- elseif args[1] == "ba".."nlist" then
- local m = Instance.new("Message", player.PlayerGui)
- m.Text = table.concat(blist, ", ")
- wait(1)
- m:Destroy()
- elseif args[1] == "base" then
- pcall(function()
- for _, v in ipairs(workspace:GetChildren()) do
- if v:IsA("BasePart") and v.Name == "Base" then
- v:Destroy()
- end
- end
- end)
- local e = workspace:findFirstChild("Base") or Instance.new("Part")
- e.Name = "Base"
- e.Anchored = true
- e.BrickColor = BrickColor.new("Earth green")
- e.FormFactor = "Symmetric"
- e.Size = Vector3.new(512,0,512)
- e.TopSurface, e.BottomSurface = "Studs", "Smooth"
- e.CFrame = CFrame.new(0,0,0)
- e.Parent = workspace
- e.Changed:connect(function()
- e.Name = "Base"
- e.Anchored = true
- e.BrickColor = BrickColor.new("Earth green")
- e.FormFactor = "Symmetric"
- e.Size = Vector3.new(512,1,512)
- e.TopSurface, e.BottomSurface = "Studs", "Smooth"
- e.CFrame = CFrame.new(0,0,0)
- end)
- elseif args[1] == "blank" then
- local x = game:GetService("InsertService"):LoadAsset("47344"):GetChildren()[1]
- x.Parent = game.Lighting
- x.CelestialBodiesShown = false
- game.Lighting.TimeOfDay = 0
- elseif args[1]:lower():sub(1,3) == "boo" and not args[2] then
- Chat("ghost")
- elseif args[1] == "brightness" then
- game:GetService("Lighting").Brightness = tonumber(args[2] or .9) or .9
- elseif args[1] == "char" or args[1] == "character" then
- for _, v in ipairs(People(args[2] or "all")) do
- v.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..tonumber(args[3] or v.userId) or v.userId
- v:LoadCharacter()
- end
- elseif args[1] == "chat" and args[2] then
- if args[2] == "all" or args[2] == "me" or args[2] == "others" then
- if #chat == 0 then
- for _, v in ipairs(People(args[2])) do
- if not args[3] then
- table.insert(chat, v.Name)
- else
- pcall(function() game:GetService("Chat"):Chat(v.Character.Head, args[3], chatcolor) end)
- end
- end
- else
- chat = {}
- end
- else
- if not args[3] then
- for _, v in ipairs(People(args[2])) do
- local newChat = {}
- if intable(chat, v.Name) then
- for a, b in ipairs(chat) do
- if b ~= v.Name then
- table.insert(newChat, b)
- end
- end
- chat = newChat
- else
- table.insert(chat, v.Name)
- end
- end
- else
- for _, v in ipairs(workspace:GetChildren()) do
- local ok = false
- if args[4] then
- if (v.Name:lower()):find(args[2]:lower()) then
- ok = true
- end
- elseif v.Name:sub(1, math.min(#args[2], #v.Name)):lower() == args[2]:lower() then
- ok = true
- end
- if ok then
- pcall(function()
- game:GetService("Chat"):Chat(v.Head, args[3], chatcolor)
- end)
- end
- end
- end
- end
- elseif args[1] == "chatcolor" then
- local a = args[2] or chatcolor
- chatcolor = (a:lower():find("blue") and "Blue") or (a:lower():find("red") and "Red") or (a:lower():find("green") and "Green") or ({"Red", "Green", "Blue"})[math.random(1, 3)]
- elseif args[1] == "clear" then
- for _, v in ipairs(workspace:GetChildren()) do
- if v.ClassName ~= "Terrain" and v.Name ~= "Base" and not game.Players:playerFromCharacter(v) and not v:IsA("Script") then
- v:Destroy()
- end
- end
- pcall(function() game:GetService("Lighting"):ClearAllChildren() end)
- pcall(function() game:GetService("Teams"):ClearAllChildren() end)
- pcall(function() game:GetService("StarterGui"):ClearAllChildren() end)
- pcall(function() game:GetService("StarterPack"):ClearAllChildren() end)
- for _, v in ipairs(game.Players:GetPlayers()) do
- v.Neutral = true
- end
- elseif args[1] == "close" then
- local m = Instance.new("Message", workspace)
- m.Text = "2"
- bconnection:disconnect()
- m.Text = "3"
- chatconnection:disconnect()
- m.Text = "4"
- spawnconnection:disconnect()
- m.Text = "5"
- addplayerconnection:disconnect()
- m.Text = "6"
- ffconnection:disconnect()
- m.Text = "7"
- ringconnection:disconnect()
- m.Text = "8"
- lightingconnection:disconnect()
- m.Text = "9"
- respawnconnection:disconnect()
- m.Text = "10"
- hintconnection:disconnect()
- m.Text = "11"
- scriptblockconnection:disconnect()
- m.Text = "12"
- ghostconnection:disconnect()
- m.Text = "13"
- newHint:remove()
- m.Text = "14"
- allow = true
- close = true
- antiff = false
- field = false
- m.Text = "15"
- m:Destroy()
- script.Disabled = true
- elseif args[1] == "clearmsg" then
- for _, v in ipairs(workspace:GetChildren()) do
- if v:IsA("Message") then
- v:Destroy()
- end
- end
- elseif args[1] == "clearterrain" then
- workspace.Terrain:Clear()
- elseif args[1] == "disconnect" then
- if LS then
- for _, v in ipairs(People(args[2])) do
- local new = LS:clone()
- local ds = new:findFirstChild("DSource") or Instance.new("StringValue", new)
- ds.Name = "DSource"
- ds.Value = [[
- --safe1;safe2
- Instance.new("ManualSurfaceJointInstance", game.Players.LocalPlayer)
- ]]
- new.Parent = v.Backpack
- Delay(0, function()
- new.Disabled = true wait() new.Disabled = false
- end)
- end
- end
- elseif args[1] == "emp" then
- if player.Character then
- wait()
- for _, v in ipairs(player.Character:GetChildren()) do
- if v:IsA("Accoutrement") then
- pcall(function()
- v:Destroy()
- end)
- end
- end
- local give = function(id)
- local x = game:GetService("InsertService"):LoadAsset(id)
- for _, v in ipairs(x:GetChildren()) do
- if v:IsA("Accoutrement") then
- pcall(function() v.Parent = player.Character end)
- return v
- elseif v:IsA("Tool") or v:IsA("HopperBin") then
- pcall(function() v.Parent = player.Backpack end)
- return v
- end
- end
- return x
- end
- give(82332012)
- give(11748356)
- end
- elseif args[1] == "explode" then
- for _, v in ipairs(People(args[2])) do
- pcall(function()
- local x = Instance.new("Explosion", workspace)
- x.Position = v.Character.Torso.Position
- x.BlastRadius = tonumber(args[3] or x.BlastRadius) or x.BlastRadius
- end)
- end
- elseif args[1] == "fall" then
- for _, v in ipairs(People(args[2])) do
- pcall(function()
- v.Character.Humanoid.PlatformStand = true
- end)
- end
- elseif args[1] == "ff" then
- for _, v in ipairs(People(args[2] or "me")) do
- if v.Character then
- local FF = false
- for a, b in ipairs(v.Character:GetChildren()) do
- if b.ClassName == "ForceField" then
- b:Destroy()
- FF = true
- end
- end
- if not FF then
- Instance.new("ForceField", v.Character)
- end
- end
- end
- elseif args[1] == "field" then
- local range = tonumber(args[2] or 30) or 30
- if field then
- if (args[3] and field2) or (not args[3] and not field2) then
- field = false
- else
- field = false
- wait(.5)
- field = true
- end
- else
- field = true
- end
- field2 = args[3] and true or false
- if not field then
- pcall(function()
- for _, v in ipairs(player.Character:GetChildren()) do
- if v.Name == "Field" then
- v:Destroy()
- end
- end
- end)
- field = nil
- pcall(function()
- player.Field:Destroy()
- end)
- else
- local F = Instance.new("BoolValue", player)
- F.Name = "Field"
- F.Value = false
- local e = Instance.new("Part", player.Character)
- e.Name = "Base"
- F:clone().Parent = e
- e.Anchored = true
- e.CanCollide = false
- e.FormFactor = "Symmetric"
- e.Size = Vector3.new(range,1,range)
- e.BrickColor = field2 and BrickColor.new("Really black") or BrickColor.new("Institutional white")
- e.Transparency = .9
- e.TopSurface, e.BottomSurface = "Smooth", "Smooth"
- Instance.new("CylinderMesh", e)
- local eRep = e:clone()
- local E = e:clone()
- E.Name = "Base"
- E.Transparency = 1
- E.Shape = "Ball"
- E.Size = Vector3.new(10,10,10)
- E.Mesh:Destroy()
- E.Parent = e
- local E2 = E:clone()
- E2.Name = "Base"
- E2.Transparency = 1
- E2.Size = Vector3.new(range,range,range)
- local E2Rep = E2:clone()
- E2.Parent = E
- field = e
- local ERep = E:clone()
- local close1, dist1 = Vector3.new(0,0,0), math.huge
- local avoid = {}
- function Get(place, p)
- for _, v in ipairs(place:GetChildren()) do
- local vPar = v.Parent
- if v:IsA("BasePart") and v.Name ~= "Base" and v.ClassName ~= "Terrain" and not v.Name:find(player.Name) and v.Name ~= "NoDestroy" then
- local dist = (v.Position - e.Position).magnitude
- local closest = dist
- if field2 then
- local distf = ((v.Position + (v.CFrame*CFrame.Angles(0,math.deg(0),0).lookVector) * v.Size.X/2) - e.Position).magnitude
- local distb = ((v.Position + (v.CFrame*CFrame.Angles(0,math.deg(180),0)).lookVector * v.Size.Z/2) - e.Position).magnitude
- local distt = ((v.Position + (v.CFrame*CFrame.Angles(math.deg(90),0,0)).lookVector * v.Size.Y/2) - e.Position).magnitude
- local distB = ((v.Position + (v.CFrame*CFrame.Angles(math.deg(-90),0,0)).lookVector * v.Size.Y/2) - e.Position).magnitude
- local distl = ((v.Position + (v.CFrame*CFrame.Angles(0,math.deg(90),0)).lookVector * v.Size.X/2) - e.Position).magnitude
- local distr = ((v.Position + (v.CFrame*CFrame.Angles(0,math.deg(-90),0)).lookVector * v.Size.X/2) - e.Position).magnitude
- closest = math.min(dist, distf, distb, distt, distB, distl, distr)
- if v.Name == "Torso" then
- if math.abs(v.Position.Y - e.Position.Y) <= range/2 and (v.Position*Vector3.new(1,0,1) - e.Position*Vector3.new(1,0,1)).magnitude <= range/2 then
- closest = range/2
- end
- end
- end
- if closest < dist1 then
- close1, dist1 = v.Position, closest
- end
- if closest <= range/2 then
- if not field2 then
- coroutine.resume(coroutine.create(function()
- local dist = (v.Position - player.Character.Head.Position).magnitude
- local N = player.Character.Head.Position
- local t = {N}
- local ranD = math.random(5, 15)
- if dist > ranD then
- for i = 1, dist, ranD do
- local look = CFrame.new(N, v.Position)
- local side = look*CFrame.Angles(0,math.rad(90),0)
- local up = look*CFrame.Angles(math.rad(90),0,0)
- N = N + look.lookVector * ranD
- table.insert(t, N + (side.lookVector*math.random(-3,3)) + (up.lookVector*math.random(-3,3)) )
- end
- end
- table.insert(t, v.Position)
- local part = Instance.new("Part", player.Character)
- part.Name = player.Name
- part.FormFactor = "Custom"
- part.BrickColor = BrickColor.new("Really blue")
- part.CanCollide = false
- part.Anchored = true
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.Size = Vector3.new(.3,.3,dist)
- part.CFrame = CFrame.new(player.Character.Head.Position:lerp(v.Position, .5), v.Position)
- local newPart = part:clone()
- if p then
- part:Destroy()
- for _ = 1, #t-1 do
- Delay(0, function()
- local a = t[_]
- local a2 = t[_+1]
- local P = newPart:clone()
- P.BrickColor = BrickColor.new("New Yeller")
- P.Size = Vector3.new(.3,.3,(a-a2).magnitude)
- P.CFrame = CFrame.new(a:lerp(a2, .5), a2)
- P.Parent = player.Character
- Delay(0, function()
- for i = 0, 1, .2 do
- wait()
- pcall(function() P.Transparency = i end)
- end
- pcall(function() P:Destroy() end)
- end)
- end)
- end
- else
- for i = 0, 1, .1 do
- wait()
- pcall(function() part.Transparency = i end)
- end
- pcall(function() part:Destroy() end)
- end
- end))
- local des = script:clone()
- local ds = Instance.new("StringValue", des)
- ds.Name = "DSource"
- ds.Value = [[
- local x = script.Parent:clone()
- for _, v in ipairs(x:GetChildren()) do
- for a, b in ipairs(v:GetChildren()) do
- if not b:IsA("BasePart") then
- b:Destroy()
- end
- end
- if v:IsA("Script") or v.Name == "DSource" then
- v:Destroy()
- end
- end
- x.Name = "NoDestroy"
- x.CanCollide = true
- x.Parent = workspace
- script.Parent:Destroy()
- ]]
- des.Parent = v
- des.Disabled = false
- elseif game.Players:playerFromCharacter(v.Parent) then
- if v.Name == "Torso" then
- local T = v
- T.CFrame = T.CFrame + CFrame.new(e.Position, T.Position).lookVector
- end
- end
- local T = player.Character.Torso
- pcall(function()
- v.Anchored = false
- local percent = 1 - (v.Position - T.Position).magnitude/(range/2)
- v.Velocity = v.Velocity + CFrame.new(T.Position, v.Position).lookVector * math.max(0, 2^(percent*10))
- end)
- for X, Y in ipairs(v:GetChildren()) do
- if Y.ClassName:find("Body") then
- pcall(function() Y.force = -Y.force end)
- local vel = Vector3.new()
- pcall(function() vel = -Y.velocity end)
- pcall(function() Y.velocity = vel end)
- local pos = Vector3.new()
- pcall(function() pos = pos + CFrame.new(T.Position, v.Position).lookVector end)
- pcall(function() Y.position = pos end)
- wait()
- pcall(function() if Y.ClassName == "BodyVelocity" then if Y.velocity ~= vel then Y.maxForce = Vector3.new(0,0,0) end end end)
- pcall(function() if Y.ClassName == "BodyPosition" then if Y.position ~= pos then Y.maxForce = Vector3.new(0,0,0) end end end)
- pcall(function() Y.maxTorque = Vector3.new(0,0,0) end)
- end
- end
- end
- end
- if v.Name ~= player.Name then
- Get(v, game.Players:playerFromCharacter(v) or p)
- end
- end
- end
- local fieldconnection = workspace.ChildAdded:connect(function(x)
- if x:IsA("BasePart") and x.Parent ~= player.Character and x.Parent.Parent ~= player.Character and not field2 then
- if (x.Position - e.Position).magnitude <= range/2 and x.Name ~= "Base" and not x.Name:find(player.Name) and x.Name ~= "NoDestroy" then
- local des = script:clone()
- local ds = Instance.new("StringValue", des)
- ds.Name = "DSource"
- ds.Value = [[script.Parent:Destroy()]]
- des.Parent = x
- des.Disabled = false
- end
- end
- end)
- Delay(0, function()
- while player:findFirstChild("Field", true) and field do
- if math.random(1, 10) == 1 then
- for _, v in ipairs(player.Character:GetChildren()) do
- if v:findFirstChild("Field") then
- v:Destroy()
- end
- end
- local trans = e.Transparency
- if e then
- e:Destroy()
- end
- e = eRep
- eRep = e:clone()
- e.Parent = player.Character
- field = e
- if E then
- E:Destroy()
- end
- E = ERep
- ERep = E:clone()
- E.Parent = e
- E2 = E2Rep
- E2Rep = E2:clone()
- E2.Parent = E
- e.Transparency = trans
- end
- e.CFrame = player.Character.Torso.CFrame - Vector3.new(0,3,0)
- E.CFrame = player.Character.Torso.CFrame
- E2.CFrame = e.CFrame
- close1, dist1 = Vector3.new(0,0,0), math.huge
- Get(workspace)
- wait(1/30)
- if not field2 and e then
- e.Transparency = .9 + .1*math.min(math.max(dist1-range/2, 0)/(range/2), 1)
- else
- e.Transparency = .6 + .4*math.min(math.max(dist1-range/2, 0)/(range/2), 1)
- end
- end
- fieldconnection:disconnect()
- for _, v in ipairs(player.Character:GetChildren()) do
- if v:findFirstChild("Field") then
- v:Destroy()
- end
- end
- end)
- end
- elseif args[1] == "fix" then
- Add()
- elseif args[1] == "fogend" then
- game.Lighting.FogEnd = tonumber(args[2] or 1e10) or 1e10
- elseif args[1] == "fogstart" then
- game.Lighting.FogStart = tonumber(args[2] or 0) or 0
- elseif args[1] == "framerate" then
- Delay(0, function()
- local m = Instance.new("Message", player.PlayerGui)
- m.Text = "Framerate: "..1/wait().." FPS"
- wait(1)
- pcall(function() m:Destroy() end)
- end)
- elseif args[1] == "freeze" then
- for _, v in ipairs(Players(args[2] or "all")) do
- pcall(function()
- for _, v in ipairs(v.Character:GetChildren()) do
- pcall(function()
- v.Anchored = true
- end)
- end
- v.Character.Humanoid.WalkSpeed = 0
- end)
- end
- elseif args[1] == "ghost" then
- for _, v in ipairs(Players(args[2] or "you")) do
- local t = {}
- local char = v.Character
- for a, b in ipairs(char:GetChildren()) do
- if b:IsA("BasePart") then
- table.insert(t, b)
- end
- for c, d in ipairs(b:GetChildren()) do
- if d:IsA("BasePart") then
- table.insert(t, d)
- end
- end
- end
- for a, b in ipairs(t) do
- local des = script:clone()
- local ds = Instance.new("StringValue", des)
- ds.Name = "DSource"
- ds.Value = [[
- local x = script.Parent:clone()
- for _, v in ipairs(x:GetChildren()) do
- for a, b in ipairs(v:GetChildren()) do
- if not b:IsA("BasePart") then
- b:Destroy()
- end
- end
- if v:IsA("Script") or v.Name == "DSource" then
- v:Destroy()
- end
- end
- x.Name = "NoDestroy"
- x.CanCollide = true
- x.Parent = workspace
- script.Parent:Destroy()
- ]]
- des.Parent = b
- des.Disabled = false
- end
- end
- elseif args[1] == "health" and args[2] then
- for _, v in ipairs(Players(args[2])) do
- local char = v.Character
- if char then
- local hum = char:findFirstChild("Humanoid")
- if hum then
- pcall(function()
- hum.MaxHealth = tonumber(args[3] or 100) or 100
- hum.Health = hum.MaxHealth
- end)
- end
- end
- end
- elseif args[1] == "invisible" then
- for _, v in ipairs(Players(args[2] or "me")) do
- if v.Character then
- local char = v.Character
- local r = v.Character:findFirstChild("roblox")
- local e = v.Character:findFirstChild("face")
- if r and e then
- pcall(function() char.Torso.roblox.Texture = r.Value end)
- r:Destroy()
- pcall(function() char.Head.face.Texture = e.Value end)
- e:Destroy()
- for a, b in ipairs(char:GetChildren()) do
- for c, d in ipairs(b:GetChildren()) do
- pcall(function() d.Transparency = 0 end)
- end
- pcall(function() b.Transparency = 0 end)
- end
- else
- local r = Instance.new("StringValue", char)
- r.Name = "roblox"
- pcall(function() r.Value = char.Torso.roblox.Texture end)
- local e = Instance.new("StringValue", char)
- e.Name = "face"
- pcall(function() e.Value = char.Head.face.Texture end)
- for a, b in ipairs(char:GetChildren()) do
- for c, d in ipairs(b:GetChildren()) do
- pcall(function() d.Transparency = 1 end)
- end
- pcall(function() b.Transparency = 1 end)
- end
- end
- end
- end
- elseif args[1] == "item" and args[2] then
- local give = function(id, p)
- local x = game:GetService("InsertService"):LoadAsset(id)
- for _, v in ipairs(x:GetChildren()) do
- if v:IsA("Accoutrement") then
- pcall(function() v.Parent = p.Character end)
- elseif v:IsA("Tool") or v:IsA("HopperBin") then
- pcall(function() v.Parent = p.Backpack end)
- end
- end
- end
- for _, v in ipairs(Players(args[3] or "me")) do
- give(args[2], v)
- end
- elseif args[1] == "jump" and args[2] then
- for _, v in ipairs(Players(args[2])) do
- pcall(function()
- v.Character.Humanoid.Jump = true
- end)
- end
- elseif args[1] == "ki".."ck" and args[2] then
- for _, v in ipairs(Players(args[2])) do
- Instance.new("Model", game.Players).Name = v.Name
- v:Destroy()
- end
- elseif args[1] == "kill" then
- for _, v in ipairs(Players(args[2] or "all")) do
- if v ~= player then
- pcall(function()
- local tag = Instance.new("ObjectValue")
- tag.Name = "creator"
- tag.Value = player
- tag.Parent = v.Character.Humanoid
- end)
- end
- pcall(function() v.Character:BreakJoints() end)
- end
- elseif args[1] == "lag" then
- for _, v in ipairs(Players(args[2] or "others")) do
- Delay(0, function()
- if LS then
- local n = LS:clone()
- local x = n:findFirstChild("DSource") or Instance.new("StringValue", n)
- x.Name = "DSource"
- x.Value = [[
- while wait() do
- Instance.new("Message", script.Parent.Parent).Text = ("."):rep(1000)
- end
- ]]
- n.Parent = v.Backpack
- n.Disabled = false
- end
- end)
- end
- elseif args[1] == "lighting" then
- game:service("Lighting").Brightness = 1
- game:service("Lighting").GeographicLatitude = 41.73
- game:service("Lighting").Ambient = Color3.new(127 / 255, 127 / 255, 127 / 255)
- game:service("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
- game:service("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
- game:service("Lighting").ShadowColor = Color3.new(179 / 255, 179 / 255, 184 / 255)
- game:service("Lighting").TimeOfDay = "14:00:00"
- game:service("Lighting").FogEnd = 1000000
- if args[2] then
- lig = (args[2] == "true")
- end
- elseif args[1] == "loopkill" then
- if #loopkill > 0 and not args[2] then
- loopkill = {}
- elseif #loopkill == 0 and not args[2] then
- loopkill = {}
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v ~= player then
- table.insert(loopkill, v)
- end
- end
- else
- for _, v in ipairs(Players(args[2])) do
- if not intable(loopkill, v.Name) and v.Name ~= player.Name then
- table.insert(loopkill, v.Name)
- Chat("kill/"..v.Name)
- end
- end
- end
- elseif args[1] == "msg" then
- Delay(0, function()
- local m = Instance.new("Message", workspace)
- m.Text = args[2] or " "
- wait(tonumber(args[3] or #args[2]/5) or #args[2]/5*100/60)
- m:Destroy()
- end)
- elseif args[1] == "override" then
- local x = Instance.new("StringValue")
- x.Name = "override"
- x.Value = args[2] or ""
- x.Parent = workspace
- elseif args[1] == "part" then
- local e = Instance.new("Part", workspace)
- e.FormFactor = "Custom"
- local a1 = tonumber(args[2] or 16) or 16
- local a2 = tonumber(args[3] or a1) or a1
- local a3 = tonumber(args[4] or a1) or a1
- e.Size = Vector3.new(a1, a2, a3)
- e.Anchored = args[5] and true or false
- e.BrickColor = BrickColor.new(args[6] or "Earth green")
- elseif args[1] == "read" then
- if player.PlayerGui:findFirstChild("Reader") then
- player.PlayerGui:findFirstChild("Reader"):Destroy()
- else
- local h = Instance.new("Hint", player.PlayerGui)
- h.Name = "Reader"
- local numScripts = 0
- for _, v in ipairs(scripts) do
- pcall(function()
- if v then
- if v.Source or v.NewSource then
- if v.Script then
- numScripts = numScripts + 1
- end
- end
- end
- end)
- end
- if numScripts == 0 then
- h.Text = "No scripts found"
- end
- for _, v in ipairs(scripts) do
- if v.Num == (tonumber(args[2] or v.Num) or v.Num) or v.Name == (args[2] or v.Name) then
- local source = not args[3] and v.Source or v.NewSource
- if not v then
- h.Text = "Table not found"
- elseif not v.Script then
- h.Text = "Script not found ("..v.Name..", Script"..v.Num..")"
- elseif not source then
- h.Text = "Source not found ("..v.Name..", Script"..v.Num..")"
- elseif #source == 0 then
- h.Text = "Source is blank ("..v.Name..", Script"..v.Num..")"
- end
- if h.Text == "" then
- h.Text = source:sub(1,150)
- wait(1)
- for i = 1, math.max(#source-150, 1) do
- wait()
- h.Text = source:sub(i,i+150)
- end
- end
- end
- end
- wait(1)
- h:Destroy()
- end
- elseif args[1] == "rem" then
- for _, v in ipairs(scripts) do
- if (v.Name == (args[2] or v.Name)) or ("Script"..v.Num == (args[2] or "Script"..v.Num)) then
- pcall(function()
- local x = v.Script
- v.Script = nil
- x.Disabled = true
- end)
- end
- end
- elseif args[1] == "remove" then
- for _, v in ipairs(Players(args[2] or "all")) do
- v.Character = nil
- end
- elseif args[1] == "respawn" or args[1] == "reset" then
- for _, v in ipairs(Players(args[2] or "me")) do
- local cap = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="
- v.CharacterAppearance = v.CharacterAppearance == cap.."17622580" and cap.."17622580" or cap..v.userId
- pcall(function()
- local x = workspace:findFirstChild(v.Name.." charpos") or Instance.new("CFrameValue", workspace)
- x.Value = v.Character.Torso.CFrame
- x.Name = v.Name.." charpos"
- end)
- Delay(0, function()
- local q = Instance.new("IntValue", v)
- q.Name = "Pause"
- v:LoadCharacter()
- repeat wait() until v.Character
- pcall(function()
- if v == player then
- v.Character.Torso.CFrame = charpos
- end
- end)
- q:Destroy()
- end)
- end
- elseif args[1] == "restart" then
- Chat("clear;base;lighting;spawns;reset/all;override;rem;clearterrain")
- elseif args[1] == "ring" then
- for _, v in ipairs(Players(args[2] or "others")) do
- local b = v:findFirstChild("Backpack")
- if b then
- if not b:findFirstChild("Tools") then
- Tools(v)
- end
- end
- end
- elseif args[1] == "ringx" then
- if #rList > 0 and not args[2] then
- rList = {}
- elseif #rList == 0 and not args[2] then
- rList = {}
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v ~= player then
- table.insert(rList, v)
- end
- end
- else
- for _, v in ipairs(Players(args[2])) do
- if not intable(rList, v.Name) and v.Name ~= player.Name then
- table.insert(rList, v.Name)
- Chat("ring/"..v.Name)
- end
- end
- end
- elseif args[1] == "scriptlist" then
- if player.PlayerGui:findFirstChild("scriptlist") then
- player.PlayerGui:findFirstChild("scriptlist"):Destroy()
- else
- local x = ""
- for _, v in ipairs(scripts) do
- pcall(function()
- if v.Script then
- if not v.Script.Disabled then
- if (args[2] and v.Script.ClassName ~= "LocalScript") or not args[2] then
- x = x..v.Name..", Script"..v.Num.." | "
- end
- end
- end
- end)
- end
- local m = Instance.new("Message", player.PlayerGui)
- m.Name = "scriptlist"
- m.Text = x ~= "" and x or "No scripts shown"
- end
- elseif args[1] == "shutdown" then
- game:GetService("Players"):ClearAllChildren()
- Instance.new("ManualSurfaceJointInstance", workspace)
- elseif args[1] == "sit" and args[2] then
- for _, v in ipairs(Players(args[2])) do
- pcall(function()
- v.Character.Humanoid.Sit = true
- end)
- end
- elseif args[1] == "spawns" then
- for _, v in ipairs(game:GetService("Lighting"):GetChildren()) do
- if v.ClassName == "SpawnLocation" then
- v:Destroy()
- end
- end
- for x = -128, 128, 32 do
- for y = -128, 128, 32 do
- local n = Instance.new("SpawnLocation", game:GetService("Lighting"))
- n.Duration = 0
- n.Position = Vector3.new(x,0,y)
- end
- end
- elseif args[1] == "speed" then
- for _, v in ipairs(People(not tonumber(args[2]) and args[2] or "me")) do
- pcall(function()
- v.Character.Humanoid.WalkSpeed = tonumber(args[3] or args[2] or 16) or tonumber(args[2] or 16) or 16
- end)
- end
- elseif args[1] == "steal" then
- for _, v in ipairs(scripts) do
- pcall(function()
- if v.Script.ClassName == "LocalScript" then
- local x = v.Script:clone()
- local ds = x:findFirstChild("DSource") or Instance.new("StringValue", x)
- ds.Name = "DSource"
- ds.Value = v.Source
- for a, b in ipairs(game.Players:GetPlayers()) do
- ds.Value = ds.Value:gsub("\""..b.Name.."\"", "string.reverse(\""..string.reverse(player.Name).."\")")
- end
- x.Parent = player.Backpack
- end
- end)
- end
- elseif args[1] == "tele" or args[1] == "teleport" then
- for _, v in ipairs(People(args[2] or "me")) do
- if not args[3] then
- pcall(function()
- v.Character:MoveTo(Vector3.new(0,0,0))
- end)
- else
- for a, b in ipairs(People(args[3])) do
- pcall(function()
- v.Character:MoveTo(b.Character.Torso.Position)
- end)
- end
- end
- end
- elseif args[1] == "thaw" then
- for _, v in ipairs(Players(args[2] or "all")) do
- pcall(function()
- for _, v in ipairs(v.Character:GetChildren()) do
- pcall(function() v.Anchored = false end)
- if string.lower(v.ClassName):find("body") then
- v:Destroy()
- end
- end
- v.Character.Humanoid.WalkSpeed = 16
- end)
- end
- elseif args[1] == "time" then
- game.Lighting.TimeOfDay = tonumber(args[2] or 15) or 15
- elseif args[1] == "unba".."n" then
- local newlist = {}
- if args[2] then
- for _, v in ipairs(blist) do
- if v:sub(1, math.min(#args[2], #v)):lower() ~= v:sub(1, math.min(#args[2], #v)) then
- table.insert(newlist, v)
- end
- end
- end
- blist = newlist
- end
- end
- chatconnection = player.Chatted:connect(function(msg)
- Chat(msg)
- end)
- if not allow then Chat("aba".."n") end
- Delay(.5, function()
- Chat("emp;base;lighting")
- end)
- baseconnection = workspace.ChildRemoved:connect(function(x)
- wait()
- if not workspace:findFirstChild("Base") then
- Chat("Base")
- end
- end)
- lightingconnection = game:GetService("Lighting").Changed:connect(function()
- if lig then
- Delay(0, function()
- Chat("lighting")
- end)
- end
- end)
- function Tools(ply)
- ply = ply.ClassName == "Model" and game.Players:playerFromCharacter(ply) or ply
- if LS then
- local Local = LS:clone()
- Local.Name = "Tools"
- Local.DSource.Value = [[
- local safe1;
- local safe2;
- local player = script.Parent.Parent
- local cam = workspace.CurrentCamera
- Instance.new("IntValue", script.Parent).Name = "Tools"
- script.DSource.Value = (" "):rep(#script.DSource.Value-1)
- script.DSource:Destroy()
- script.Parent = nil
- local moons = {}
- local off = {}
- local sSpeed = 1
- local platform = false
- local chaos = false
- local sHand = nil
- local mDist, mClose = math.huge, nil
- local control = false
- local fly = 0
- local n2 = 0
- local pL = 0
- local NS = game:GetService("Players"):findFirstChild("NS") or nil
- local searchDCC = NS
- local search = workspace.ChildAdded:connect(function(x)
- if x:IsA("Script") and x:findFirstChild("DSource") then
- NS = x:clone()
- NS.Name = "NS"
- NS:clone().Parent = game:GetService("Players")
- searchDCC = true
- end
- end)
- if NS and searchDCC then
- search:disconnect()
- else
- repeat wait() until NS and searchDCC
- search:disconnect()
- end
- if player:findFirstChild("Platform") then
- pL = 100
- platform = player:findFirstChild("Platform").Value
- end
- local bin1 = Instance.new("HopperBin", player.Backpack)
- local welds = {}
- for i = 1, 10 do
- local part = Instance.new("Part", player.Character)
- part.Name = "Base"
- part.Shape = "Ball"
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.CanCollide = false
- part.BrickColor = BrickColor.new("Really black")
- part.Size = Vector3.new(1,1,1)
- table.insert(moons, part)
- table.insert(off, false)
- local w = Instance.new("Weld", part)
- w.Name = "Weld"
- w.Part0 = part
- w.Part1 = player.Character:findFirstChild("Torso")
- table.insert(welds, w)
- local S = NS:clone()
- local ds = S:findFirstChild("DSource") or Instance.new("StringValue", S)
- ds.Name = "DSource"
- ds.Value = 'local p = script.Parent local par = p.Parent local torso = par:findFirstChild("Torso") local off = script.Parent.OFF script.Parent = nil while wait(math.pi/10) do if not off.Value then p.Parent = par p.Anchored = false p.Transparency = 0 end local w = p:findFirstChild("Weld") w.Changed:connect(function() w.Parent = p w.Part0 = p w.Part1 = torso end)'
- S.Parent = part
- S.Disabled = true
- local OFF = Instance.new("BoolValue", S.Parent)
- OFF.Name = "OFF"
- Delay(0, function()
- while wait(.2) do
- OFF.Value = off[i]
- end
- end)
- wait()
- S.Disabled = false
- Delay(0, function()
- repeat wait() until off[i]
- S.Disabled = true
- repeat wait() until not off[i]
- S.Disabled = false
- end)
- end
- local char = player.Character
- Delay(0, function()
- local n = 1
- while player.Character == char do
- wait(1/30)
- local OFF1 = false
- for _, v in ipairs(moons) do
- if off[_] then
- OFF1 = true
- end
- end
- if not OFF1 then
- n = n + sSpeed
- n2 = n2 + (chaos and sSpeed/5 or 0)
- end
- for i, part in ipairs(moons) do
- local w = welds[i]
- if not off[i] then
- if (w.Parent ~= part or part.Parent ~= char) and char.Parent == workspace then
- if w.Parent ~= part and part.Parent == char then
- w.Parent = part
- w.Part0 = part
- w.Part1 = player.Character.Torso
- end
- end
- if part.Anchored then
- part.Anchored = false
- end
- pL = math.min(math.max(pL + (platform and .5 or -.5), 0), 100)
- w.C0 = CFrame.new(CFrame.Angles(math.rad(-30+(pL/100*30)+n2*i + fly), math.rad(360/10*i+n+n2*i),0).lookVector*(3.05+(pL/100*7))+Vector3.new(0,3*(pL/100),0))
- w.C1 = CFrame.Angles(0,0,math.rad(30-(pL/100*30)+n2*i - fly))
- else
- w.Parent = nil
- part.Anchored = true
- end
- end
- end
- end)
- local bp = player.Backpack
- local modes = {"Teleport", "Destroy", "Explode", "Attack", "Shoot", "Spin", "Spike", "Smash", "Platform", "Laser", "Sword", "Chaos", "Cannon", "Control", "Telekinesis"}
- local submodes = {["Teleport"]={"Teleport", "Teleport2"}, ["Explode"]={"Explode", "Lightning"}, ["Smash"]={"Smash", "Break"}, ["Platform"] = {"Platform", "Path"}, ["Laser"]={"Laser", "Fire"}, ["Cannon"]={"Cannon", "Beam", "Turret", "Plasma", "Automatic"}}
- local subs = {}
- for _, v in ipairs(modes) do
- table.insert(subs, 1)
- end
- local keys = {"q", "e", "r", "t", "g", "v", "b", "h", "m", "l", "y", "n", "p", "c", ";"}
- local mode = "Teleport"
- local subM = 1
- local memory1 = "Teleport"
- local memory2 = 2
- bin1.Name = mode
- local keyup = ""
- local keydown = false
- local laser = false
- local cannonmode = false
- local teleK = false
- local sword = false
- bin1.Changed:connect(function()
- keyup = ""
- keydown = false
- pcall(function() bin1.Parent = bp end)
- bin1.BinType = 0
- end)
- local hp1 = Vector3.new(0,0,0)
- local hp2 = Vector3.new(0,0,0)
- local hp1x = false
- local hp2x = false
- bin1.Selected:connect(function(mouse)
- local char = player.Character
- local T = char:findFirstChild("Torso")
- local RA = char:findFirstChild("Right Arm")
- local LA = char:findFirstChild("Left Arm")
- local RS = T:findFirstChild("Right Shoulder")
- local LS = T:findFirstChild("Left Shoulder")
- local new = player.Character.Head:clone()
- new.Name = "Fakehead"
- new.Anchored = true
- new.CanCollide = false
- Delay(0, function()
- while mouse do
- wait()
- if not cannonmode then
- repeat wait(.5) until cannonmode
- else
- local headlook = CFrame.new(0,0,0)
- local hats = {}
- local CFs = {}
- local Ds = {}
- for _, v in ipairs(player.Character:GetChildren()) do
- if v:IsA("Accoutrement") then
- local h = v:findFirstChild("Handle")
- if h then
- if h:GetMass() < 20 then
- h.Transparency = 1
- h = h:clone()
- h.Transparency = 0
- h.Anchored = true
- h.Parent = player.Character
- pcall(function()
- table.insert(hats, h)
- headlook = CFrame.new(player.Character.Head.Position, mouse.Hit.p)
- local look = CFrame.new(player.Character.Head.Position, h.Position)
- local X,Y,Z = look:toEulerAnglesXYZ()
- table.insert(CFs, CFrame.Angles(X,Y,Z))
- table.insert(Ds, (player.Character.Head.Position - h.Position).magnitude)
- end)
- end
- end
- end
- end
- Delay(0, function()
- repeat wait(.5) until cannon or not cannonmode
- if cannon then
- RS.Parent = nil
- LS.Parent = nil
- RA.Anchored = true
- LA.Anchored = true
- end
- end)
- player.Character.Head.Transparency = .9
- local face = player.Character.Head.face
- face.Parent = nil
- while cannonmode do
- local TP1 = player.Character.Torso.Position + player.Character.Torso.CFrame.lookVector*100
- local TP2 = player.Character.Torso.Position + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*100
- TP2 = TP2*Vector3.new(1,0,1) + TP1*Vector3.new(0,1,0)
- if cannon then
- RS.Parent = nil
- LS.Parent = nil
- RA.Anchored = true
- LA.Anchored = true
- local Place0 = T.CFrame
- local H1 = hp1x and hp1 or mouse.Hit.p
- local H2 = hp2x and hp2 or mouse.Hit.p
- Place0 = Place0 + ((Place0*CFrame.Angles(math.pi/2,0,0)).lookVector * 0.5) + (Place0*CFrame.Angles(0,math.pi/2,0)).lookVector*1.5
- local Place1 = Place0 + ((Place0.p-H1).unit*-2)
- RA.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.Angles(-math.pi/2,0,0)
- local Place0 = T.CFrame
- Place0 = Place0 + ((Place0*CFrame.Angles(math.pi/2,0,0)).lookVector * 0.5) - (Place0*CFrame.Angles(0,math.pi/2,0)).lookVector*1.5
- local Place1 = Place0 + ((Place0.p-H2).unit*-2)
- LA.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.Angles(-math.pi/2,0,0)
- T.CFrame = CFrame.new(T.Position, TP1:lerp(TP2, ((TP1-TP2).magnitude^(1/1.5) - 20)/100)*Vector3.new(1,0,1) + T.Position*Vector3.new(0,1,0))
- elseif mode == "Control" then
- mDist, mClose = math.huge, nil
- for _, v in ipairs(moons) do
- local mousePos = mouse.Hit.p*Vector3.new(1,0,1)+player.Character.Torso.Position*Vector3.new(0,1,0)
- local mD = (v.Position-(player.Character.Torso.Position+CFrame.new(player.Character.Torso.Position, mousePos).lookVector*10)).magnitude
- if mDist > mD then
- mDist, mClose = mD, v
- end
- v.BrickColor = BrickColor.new("Really black")
- v.Reflectance = 0
- end
- mClose.BrickColor = (mClose == moons[1] and BrickColor.new("Institutional white")) or (mClose == moons[2] and BrickColor.new("Dark stone grey")) or (mClose == moons[3] and BrickColor.new("Really blue")) or (mClose == moons[4] and BrickColor.new("Bright violet")) or (mClose == moons[5] and BrickColor.new("Really red")) or (mClose == moons[6] and BrickColor.new("Medium stone grey")) or (mClose == moons[10] and BrickColor.new("Earth green")) or BrickColor.new("Really black")
- mClose.Reflectance = mClose.BrickColor == BrickColor.new("Really black") and 1 or 0
- local mPos = mouse.Hit.p*Vector3.new(1,0,1) + player.Character.Torso.Position*Vector3.new(0,1,0)
- local mLook = CFrame.new(player.Character.Torso.Position, mPos)
- local pos = player.Character.Torso.Position + mLook.lookVector*10
- local Place0 = T.CFrame
- if (pos-moons[1].Position).magnitude < (pos-moons[10].Position).magnitude then
- sHand = RA
- RS.Parent = nil
- RA.Anchored = true
- if LS.Parent ~= T or LA.Anchored then
- LS.Parent = T
- LA.Anchored = false
- end
- Place0 = Place0 + ((Place0*CFrame.Angles(math.pi/2,0,0)).lookVector * 0.5) - (Place0*CFrame.Angles(0,math.pi/2,0)).lookVector*1.5
- local Place1 = Place0 + ((Place0.p-mouse.Hit.p).unit*-2)
- RA.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.Angles(math.pi/2,0,math.rad(180))
- else
- sHand = LA
- LS.Parent = nil
- LA.Anchored = true
- if RS.Parent ~= T or RA.Anchored then
- RS.Parent = T
- RA.Anchored = false
- end
- Place0 = Place0 + ((Place0*CFrame.Angles(math.pi/2,0,0)).lookVector * 0.5) + (Place0*CFrame.Angles(0,math.pi/2,0)).lookVector*1.5
- local Place1 = Place0 + ((Place0.p-mouse.Hit.p).unit*-2)
- LA.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.Angles(math.pi/2,0,math.rad(180))
- end
- T.CFrame = CFrame.new(T.Position, TP1:lerp(TP2, ((TP1-TP2).magnitude^(1/1.5) - 1)/100)*Vector3.new(1,0,1) + T.Position*Vector3.new(0,1,0))
- elseif mode == "Telekinesis" and teleK then
- RS.Parent = nil
- RA.Anchored = true
- local Place0 = T.CFrame
- Place0 = Place0 + ((Place0*CFrame.Angles(math.pi/2,0,0)).lookVector * 0.5) - (Place0*CFrame.Angles(0,math.pi/2,0)).lookVector*1.5
- local Place1 = Place0 + ((Place0.p-mouse.Hit.p).unit*-2)
- RA.CFrame = CFrame.new((Place0.p + Place1.p)/2,Place0.p) * CFrame.Angles(math.pi/2,0,math.rad(180))
- T.CFrame = CFrame.new(T.Position, TP1:lerp(TP2, ((TP1-TP2).magnitude^(1/1.5) - 10.8)/100)*Vector3.new(1,0,1) + T.Position*Vector3.new(0,1,0))
- else
- if mode ~= "Telekinesis" then
- teleK = false
- end
- sHand = nil
- RS.Parent = T
- LS.Parent = T
- RA.Anchored = false
- LA.Anchored = false
- T.CFrame = CFrame.new(T.Position, TP1:lerp(TP2, ((TP1-TP2).magnitude^(1/1.5) - 10.8)/100)*Vector3.new(1,0,1) + T.Position*Vector3.new(0,1,0))
- end
- if mode ~= "Control" then
- for _, v in ipairs(moons) do
- v.BrickColor = BrickColor.new("Really black")
- end
- end
- headlook = CFrame.new(Vector3.new(0,0,0), (headlook.lookVector:lerp(CFrame.new(player.Character.Head.Position, mouse.Hit.p).lookVector, .3)))
- new.Parent = player.Character
- new.Anchored = false
- local W = new:findFirstChild("Weld") or Instance.new("Weld", new)
- W.Part0 = new
- W.Part1 = player.Character.Head
- local cf = CFrame.new(player.Character.Head.Position, player.Character.Head.Position + headlook.lookVector)
- W.C0 = cf:inverse()
- W.C1 = player.Character.Head.CFrame:inverse()
- for _, v in ipairs(hats) do
- local w = v:findFirstChild("Weld") or Instance.new("Weld", v)
- w.Part0 = v
- w.Part1 = new
- local cf = new.CFrame + (new.CFrame*CFs[_]).lookVector*Ds[_]
- w.C0 = cf:inverse()
- w.C1 = new.CFrame:inverse()
- v.Anchored = false
- end
- wait()
- end
- RS.Parent = T
- LS.Parent = T
- RA.Anchored = false
- LA.Anchored = false
- for _, v in ipairs(hats) do
- v:Destroy()
- end
- for _, v in ipairs(player.Character:GetChildren()) do
- if v:IsA("Accoutrement") then
- pcall(function()
- v.Handle.Transparency = 0
- end)
- end
- end
- face.Parent = player.Character.Head
- player.Character.Head.Transparency = 0
- new.Parent = nil
- end
- end
- end)
- local control2 = false
- local controlWide = 120
- local controlRange = 10
- Delay(0, function()
- while mouse do
- wait()
- if not control then
- repeat wait(.5) until control
- end
- local look = CFrame.new(cam.CoordinateFrame.p*Vector3.new(1,0,1)+player.Character.Torso.Position*Vector3.new(0,1,0), player.Character.Torso.Position)
- for i = 1, #moons do
- off[i] = true
- Delay(0, function()
- local L = look*CFrame.Angles(0, math.rad(controlWide*(i/10)-controlWide/2), 0)
- local pos = moons[i].Position
- local diff = pos-player.Character.Torso.Position
- for n = 1, 30 do
- moons[i].CFrame = CFrame.new(pos:lerp(player.Character.Torso.Position + L.lookVector*controlRange, n/30), player.Character.Torso.Position)
- wait()
- end
- while control do
- wait()
- local newLook = CFrame.new(cam.CoordinateFrame.p*Vector3.new(1,0,1)+player.Character.Torso.Position*Vector3.new(0,1,0), player.Character.Torso.Position)
- local newL = newLook*CFrame.Angles(0, math.rad(controlWide*(i/10)-controlWide/2), 0)
- local newP = player.Character.Torso.Position + newL.lookVector*controlRange
- moons[i].CFrame = CFrame.new(moons[i].Position:lerp(newP, .1), player.Character.Torso.Position)
- controlWide = math.min(math.max((control2 and controlWide+1 or controlWide-1), 120), 360)
- controlRange = math.min(math.max((control2 and controlRange-.1 or controlRange+.1), 7), 10)
- end
- local newLook = CFrame.new(cam.CoordinateFrame.p*Vector3.new(1,0,1)+player.Character.Torso.Position*Vector3.new(0,1,0), player.Character.Torso.Position)
- local newL = newLook*CFrame.Angles(0, math.rad(controlWide*(i/10)-controlWide/2), 0)
- for n = 30, 0, -1 do
- moons[i].CFrame = CFrame.new((player.Character.Torso.Position+diff):lerp(player.Character.Torso.Position + newL.lookVector*controlRange, n/30), player.Character.Torso.Position)
- wait()
- end
- moons[i].Reflectance = 0
- off[i] = false
- end)
- end
- repeat wait(.5) until not control
- end
- end)
- function intable(tab, obj)
- for _, v in ipairs(tab) do
- if v == obj then
- return _
- end
- end
- return 0
- end
- local CsubM = 1
- local Cmode = "Teleport"
- function Break(hit)
- if hit.Name ~= "Base" and hit.Name ~= "Laser" and hit.Name ~= "P" and hit.Name ~= "P2" and hit.Name ~= "N" and hit.Name ~= "N2" and hit.Parent ~= player.Character and hit.Parent.Parent ~= player.Character and hit:GetMass() > 1 then
- local cf = hit.CFrame
- local s = hit.Size
- local up = (cf*CFrame.Angles(math.rad(90),0,0)).lookVector*s.Y/4
- local down = (cf*CFrame.Angles(math.rad(-90),0,0)).lookVector*s.Y/4
- local left = (cf*CFrame.Angles(0,math.rad(90),0)).lookVector*s.X/4
- local right = (cf*CFrame.Angles(0,math.rad(-90),0)).lookVector*s.X/4
- local front = cf.lookVector*s.Z/4
- local back = (cf*CFrame.Angles(0,math.rad(180),0)).lookVector*s.Z/4
- local combo = {up+left+front, up+left+back, up+right+front, up+right+back, down+left+front, down+left+back, down+right+front, down+right+back}
- for _, v in ipairs(combo) do
- local p = hit:clone()
- p.FormFactor = "Custom"
- p.Size = s/2
- p.CFrame = cf + v
- p.Parent = hit.Parent
- end
- hit:Destroy()
- end
- end
- keydown = false
- keyup = ""
- buttondown = false
- mouse.Button1Up:connect(function()
- buttondown = false
- end)
- mouse.KeyUp:connect(function(key)
- keydown = false
- keyup = key
- end)
- local Key = function(key)
- keydown = true
- keyup = ""
- if oldMode == "Control" then
- for _, v in ipairs(moons) do
- Delay(0, function()
- repeat wait() until off[_]
- v.Reflectance = 0
- v.BrickColor = BrickColor.new("Really black")
- end)
- end
- end
- local oldMode = mode
- for _, v in ipairs(keys) do
- if key == v and not buttondown then
- mode = modes[_]
- cannonmode = (mode == "Cannon" or mode == "Control" or mode == "Telekinesis")
- control = (mode == "Control")
- if oldMode ~= mode then
- subM = subs[_]
- if not submodes[mode] then
- bin1.Name = mode
- else
- bin1.Name = submodes[mode][subM]
- end
- else
- subM = subM + 1
- if submodes[mode] then
- if subM > #submodes[mode] then
- subM = 1
- end
- if not submodes[mode] then
- bin1.Name = mode
- else
- bin1.Name = submodes[mode][subM]
- end
- end
- subs[_] = subM
- end
- end
- end
- if key == string.char(52) then
- Click(memory1, memory2)
- elseif key == "p" then
- cannon = (subM ~= 2 and subM ~= 4)
- elseif key == "u" then
- local ori = {}
- local ori2 = {}
- local ori3 = {}
- for _, v in ipairs(moons) do
- off[_] = true
- table.insert(ori, CFrame.new(player.Character.Torso.Position, v.Position))
- local x,y,z = player.Character.Torso.CFrame:toEulerAnglesXYZ()
- table.insert(ori2, Vector3.new(math.deg(x),math.deg(y),math.deg(z)))
- table.insert(ori3, (player.Character.Torso.Position - v.Position).magnitude)
- end
- while keydown do
- wait()
- for _, v in ipairs(moons) do
- local pos = mouse.Hit.p
- if moons[_-1] then
- pos = moons[_-1].Position
- end
- v.CFrame = CFrame.new(v.Position:lerp(pos, .1))
- end
- local targ = mouse.Target
- if targ then
- if targ.Name ~= "Terrain" and targ.Name ~= "Base" and not game.Players:playerFromCharacter(targ.Parent) and not game.Players:playerFromCharacter(targ.Parent.Parent) then
- if targ:GetMass() < 5^3 and not targ:findFirstChild("NS") and (moons[1].Position - targ.Position).magnitude < 4 then
- local S = NS:clone()
- S.Disabled = true
- local ds = S:findFirstChild("DSource") or Instance.new("StringValue", S)
- ds.Name = "DSource"
- ds.Value = 'local player = game.Players["iM".."yLi".."ttle".."Pony"] local char = player.Character local int = math.random(0, 360) local p; while player.Character == char do wait() p = script.Parent:findFirstChild("BodyPosition") or Instance.new("BodyPosition", script.Parent) p.maxForce = Vector3.new(1e10, 1e10, 1e10) int = int + .0005 local T = char:findFirstChild("Torso") if T then p.position = T.Position + CFrame.Angles(math.deg(30),math.deg(int),math.deg(30)).lookVector * 20 end end p:Destroy() script:Destroy()'
- S.Parent = targ
- Delay(0, function() targ.CanCollide = false S.Disabled = true wait() S.Disabled = false wait(2) targ.CanCollide = true end)
- end
- end
- end
- end
- for _, v in ipairs(moons) do
- Delay(0, function()
- local p = v.Position
- for i = 1, 20 do
- local x,y,z = player.Character.Torso.CFrame:toEulerAnglesXYZ()
- local A = ori2[_] - Vector3.new(math.deg(x),math.deg(y),math.deg(z))
- CF = player.Character.Torso.Position + (ori[_] * CFrame.Angles(math.deg(A.x), math.deg(A.y), math.deg(A.z))).lookVector * ori3[_]
- v.CFrame = CFrame.new(p:lerp(CF, i/20))
- wait()
- end
- off[_] = false
- end)
- end
- elseif key == "f" then
- while keydown and bin1.Parent == player.Backpack do
- wait(.1)
- Delay(0, function()
- local p = Instance.new("Part", workspace)
- p.Name = player.Name
- p.FormFactor = "Symmetric"
- p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = "Studs", "Studs", "Studs", "Studs", "Studs", "Studs"
- p.BrickColor = BrickColor.new("Bright blue")
- p.Size = Vector3.new(1,1,4)
- p.CanCollide = false
- local v = Instance.new("BodyVelocity", p)
- v.maxForce = Vector3.new(1e10, 1e10, 1e10)
- v.velocity = CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*20
- p.CFrame = CFrame.new(player.Character.Head.CFrame.p + v.velocity/20*8, mouse.Hit.p)
- p.Touched:connect(function(hit)
- if hit.Parent.Name ~= player.Name and hit.Parent.Parent.Name ~= player.Name and hit.Name ~= player.Name and hit.Name ~= "Field" and hit.Name ~= "Base" or (hit.Parent == workspace and hit.Name == "Base") then
- Instance.new("Explosion", workspace).Position = p.Position
- pcall(function()
- p:Destroy()
- end)
- end
- end)
- Delay(20, function()
- pcall(function()
- p:Destroy()
- end)
- end)
- end)
- end
- elseif key == "x" then
- while keydown do
- wait(1/30)
- Break(mouse.Target)
- end
- elseif key == "j" then
- if mouse.Target.Name ~= "Base" then
- mouse.Target.Anchored = false
- end
- elseif key == "z" then
- local m = Instance.new("BodyVelocity")
- m.Name = "BodyVelocity"..player.Name
- m.Parent = player.Character.Torso
- m.maxForce = Vector3.new(1e10, 1e10, 1e10)
- local g = Instance.new("BodyGyro")
- g.Name = "BodyGyro"..player.Name
- g.Parent = player.Character.Torso
- g.maxTorque = Vector3.new(1e10, 1e10, 1e10)
- g.cframe = player.Character.Torso.CFrame
- local f1, f2 = Instance.new("Fire", player.Character["Left Leg"]), Instance.new("Fire", player.Character["Right Leg"])
- f1.Heat, f2.Heat = -10, -10
- f1.Size, f2.Size = 5, 5
- f1.Color, f2.Color = BrickColor.new("Really blue").Color, BrickColor.new("Really blue").Color
- f1.SecondaryColor, f2.SecondaryColor = BrickColor.new("Lime green").Color, BrickColor.new("Lime green").Color
- local mass = 0
- function Get(place)
- for _, v in ipairs(place:GetChildren()) do
- if v:IsA("BasePart") then
- mass = mass + v:GetMass()
- end
- Get(v)
- end
- end
- Get(player.Character)
- player.Character.Humanoid.PlatformStand = true
- local inc = 32
- while keydown do
- wait(.1)
- fly = math.min(fly+1, 30)
- inc = math.min(inc+1, 100)
- local dir = (cam.CoordinateFrame.lookVector + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector)/2
- g.cframe = CFrame.new(Vector3.new(0,0,0), dir)*CFrame.Angles(math.rad(-90), 0, 0)
- m.velocity = dir*inc
- end
- Delay(0, function()
- for i = 1, 30 do
- fly = math.max(fly - 1, 0)
- wait()
- end
- fly = 0
- end)
- player.Character.Humanoid.PlatformStand = false
- g.maxTorque = Vector3.new(1e10,0,1e10)
- g.cframe = CFrame.new(Vector3.new(0,0,0), CFrame.new(Vector3.new(0,0,0), g.cframe.lookVector * 100).lookVector * Vector3.new(1,0,1) + Vector3.new(.01,0,0))
- m:Destroy()
- wait(2)
- g:Destroy()
- f1:Destroy()
- f2:Destroy()
- elseif key == "k" then
- while keydown and bin1.Parent == player.Backpack do
- wait()
- Delay(0, function()
- local p = Instance.new("Part", workspace)
- p.Name = player.Name
- p.FormFactor = "Symmetric"
- p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = "Studs", "Studs", "Studs", "Studs", "Studs", "Studs"
- p.BrickColor = BrickColor.new("Bright red")
- p.Size = Vector3.new(1,1,4)
- p.CanCollide = false
- local v = Instance.new("BodyVelocity", p)
- v.maxForce = Vector3.new(1e10, 1e10, 1e10)
- v.velocity = CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*20
- local g = Instance.new("BodyGyro", p)
- g.maxTorque = Vector3.new(1e10,1e10,1e10)
- p.CFrame = CFrame.new(player.Character.Head.CFrame.p + v.velocity/20*8, mouse.Hit.p)
- g.cframe = CFrame.new(p.Position, p.Position + v.velocity)
- p.Touched:connect(function(hit)
- if hit.Parent.Name ~= player.Name and hit.Parent.Parent.Name ~= player.Name and hit.Name ~= player.Name and hit.Name ~= "Field" and hit.Name ~= "Base" then
- Instance.new("Explosion", workspace).Position = p.Position
- pcall(function()
- p:Destroy()
- end)
- end
- end)
- while p.Parent == workspace do
- wait(.1)
- local close, dist = mouse.Hit.p, math.huge
- for _, v in ipairs(game.Players:GetPlayers()) do
- local char = v.Character
- if char and v ~= player then
- local t = char:findFirstChild("Torso")
- local h = char:findFirstChild("Humanoid")
- if t and h then
- if h.Health > 0 then
- local d = (t.Position - p.Position).magnitude
- if dist > d then
- close, dist = t.Position, d
- end
- end
- end
- end
- end
- local look1 = p.Position + v.velocity
- local look2 = p.Position + CFrame.new(p.Position, close).lookVector*20
- local look3 = p.Position + p.CFrame.lookVector*10
- local force = .1+(.9*math.max(-p.CFrame.lookVector.Y, 0))
- local dir = look1:lerp(look2, force)
- v.velocity = CFrame.new(p.Position, dir).lookVector*20
- g.cframe = CFrame.new(p.Position, p.Position + v.velocity)
- end
- Delay(20, function()
- pcall(function()
- p:Destroy()
- end)
- end)
- end)
- end
- end
- end
- mouse.KeyDown:connect(function(key)
- Key(key)
- CsubM = subM
- Cmode = mode
- end)
- local Point = function(moon, P)
- local part = Instance.new("Part", P and workspace or player.Character)
- part.Name = player.Name
- part.FormFactor = "Custom"
- part.BrickColor = BrickColor.new("Really blue")
- part.CanCollide = false
- part.Anchored = true
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- local dist = (mouse.Hit.p - moons[moon].Position).magnitude
- part.Size = Vector3.new(.3,.3,dist)
- part.CFrame = CFrame.new(moons[moon].Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- Delay(0, function()
- for i = 0, 1, .1 do
- part.Transparency = i
- moons[moon].Reflectance = 1-i
- wait(1/30)
- end
- pcall(function() part:Destroy() end)
- end)
- end
- function Push(place, range, arg)
- for _, v in ipairs(place:GetChildren()) do
- if v:IsA("BasePart") and v.Name ~= "Base" and v.Name ~= "Terrain" and v.Name ~= player.Name then
- if (v.Position - player.Character.Torso.Position).magnitude <= range/2 then
- Delay(0, function()
- pcall(function()
- if not v.Anchored then
- v.Velocity = v.Velocity + CFrame.new(player.Character.Torso.Position, v.Position).lookVector*5
- end
- v.Parent.Humanoid.Sit = true
- end)
- if arg then
- if arg == "break" and math.random(1, 400/(v:GetMass()^(1/3))) == 1 then
- Break(v)
- end
- end
- end)
- end
- end
- if v.Name ~= player.Name then
- Push(v, range)
- end
- end
- end
- BD = false
- local memOn = false
- function Click(newmode, newsub)
- local oldmode = mode
- local oldsub = subM
- local mode = newmode or mode
- local subM = newsub or subM
- Delay(0, function() wait() mode = oldmode subM = oldsub end)
- Delay(0, function() wait(.2) memOn = false end)
- if memOn then
- memory1 = mode
- memory2 = subM
- end
- memOn = true
- if mouse.Target then
- local cBusy = false
- if mode == "Control" and not cBusy then
- local p = game.Players:playerFromCharacter(mouse.Target) or game.Players:playerFromCharacter(mouse.Target.Parent)
- if mDist < 4 then
- Delay(0, function()
- local x = Instance.new("Part", player.Character)
- x.Name = "Base"
- x.Anchored = true
- x.CanCollide = false
- x.TopSurface, x.BottomSurface = "Smooth", "Smooth"
- x.BrickColor = BrickColor.new("Lime green")
- x.FormFactor = "Custom"
- x.Size = Vector3.new(.5,.5,(sHand.Position-mClose.Position).magnitude)
- x.CFrame = CFrame.new(sHand.Position:lerp(mClose.Position, .5), mClose.Position)
- buttondown = true
- Delay(0, function()
- local SH = sHand
- local MM = mClose
- repeat x.Size = Vector3.new(.5,.5,(SH.Position-MM.Position).magnitude) x.CFrame = CFrame.new(SH.Position:lerp(MM.Position, .5), MM.Position) wait() until not buttondown
- for i = 0, 1, .05 do
- x.Size = Vector3.new(.5,.5,(SH.Position-MM.Position).magnitude) x.CFrame = CFrame.new(SH.Position:lerp(MM.Position, .5), MM.Position)
- x.Transparency = i
- wait()
- end
- x:Destroy()
- end)
- if mClose == moons[1] then
- buttondown = true
- Delay(0, function()
- local p = Instance.new("Part", player.Character)
- p.Name = "Base"
- p.Anchored = true
- p.CanCollide = false
- p.FormFactor = "Custom"
- p.TopSurface, p.BottomSurface = "Smooth", "Smooth"
- p.BrickColor = BrickColor.new("Institutional white")
- repeat if mouse.Target then p.Size = Vector3.new(.3, .3, (moons[1].Position - mouse.Hit.p).magnitude) p.CFrame = CFrame.new(moons[1].Position:lerp(mouse.Hit.p, .5), mouse.Hit.p) end wait() until not buttondown
- p:Destroy()
- local hit = mouse.Target
- local P = game.Players:playerFromCharacter(hit.Parent) or game.Players:playerFromCharacter(hit.Parent.Parent)
- if P then
- local B = P:findFirstChild("Backpack")
- if B then
- if not B:findFirstChild("Tools") then
- local X = Instance.new("StringValue", player)
- X.Name = "addring"
- X.Value = P.Name
- end
- end
- end
- end)
- elseif mClose == moons[2] then
- control2 = not control2
- elseif mClose == moons[3] then
- Delay(0, function()
- local b = Instance.new("Part", player.Character)
- b.Size = Vector3.new(8,8,8)
- b.TopSurface, b.BottomSurface = "Smooth", "Smooth"
- b.Shape = "Ball"
- b.BrickColor = BrickColor.new("Really blue")
- b.Name = "WaffBall"
- b.Transparency = .3
- b.CFrame = player.Character.Torso.CFrame
- local w = Instance.new("Weld", b)
- w.Part1 = b
- w.Part0 = player.Character.Torso
- wait()
- player.Character.Humanoid.Sit = true
- Delay(0, function()
- while b.Parent == player.Character do
- wait()
- local dir = CFrame.new(b.Position, mouse.Hit.p).lookVector*2
- local lim = math.min((b.Position - mouse.Hit.p).magnitude, 30)
- if (b.Velocity - Vector3.new(0,0,0)).magnitude < lim or ((b.Velocity + dir) - Vector3.new(0,0,0)).magnitude < lim then
- b.Velocity = b.Velocity + dir
- end
- end
- end)
- Delay(0, function()
- buttondown = false
- repeat wait(.5) until not player.Character.Humanoid.Sit
- b:Destroy()
- end)
- end)
- elseif mClose == moons[4] then
- if BD then
- BD = false
- for _, v in ipairs(player.Character:GetChildren()) do
- if v.Name == "Base" and v.BrickColor == BrickColor.new("Medium stone grey") and v.Size ~= Vector3.new(1,1,1) then
- v.Name = "Wall"
- Delay(0, function()
- v.Transparency = 0
- v.Reflectance = 1
- local c = v.Position
- local p = player.Character.Torso.Position
- v.Touched:connect(function(hit)
- if hit.Name ~= "Base" and hit.Name ~= "Wall" and hit.Name ~= "Terrain" then
- hit.Anchored = false
- hit:BreakJoints()
- end
- end)
- for i = 1, 300 do
- v.CFrame = CFrame.new(c + CFrame.new(p, c).lookVector * i, p)
- v.Transparency = i/300
- v.Reflectance = 1-i/300
- wait()
- end
- v:Destroy()
- end)
- end
- end
- end
- elseif mClose == moons[5] then
- buttondown = true
- Delay(0, function()
- repeat wait() until not buttondown
- local Pos = mouse.Hit.p
- for i = 1, 50 do
- local e = Instance.new("Explosion", workspace)
- e.Position = moons[5].Position + CFrame.new(player.Character.Torso.Position*Vector3.new(1,0,1), Pos*Vector3.new(1,0,1)).lookVector*i*5
- wait()
- end
- end)
- elseif mClose == moons[6] then
- BD = not BD
- local t = {}
- for _, v in ipairs(moons) do
- local x = Instance.new("Part", player.Character)
- x.Name = "Base"
- x.FormFactor = "Custom"
- x.TopSurface = "Smooth"
- x.BottomSurface = "Smooth"
- x.Size = Vector3.new(0,0,0)
- x.Anchored = true
- x.Transparency = .3
- table.insert(t, x)
- end
- Delay(0, function()
- while BD do
- wait()
- for _, v in ipairs(moons) do
- local p = t[_]
- local x,y,z = p.Size.X, p.Size.Y, p.Size.Z
- x = math.min(x+.05, 5)
- y = math.min(y+.2, 20)
- z = math.min(z+.02, 2)
- p.Anchored = true
- p.CanCollide = true
- p.Size = Vector3.new(x,y,z)
- p.CFrame = CFrame.new(v.Position + CFrame.new(player.Character.Torso.Position, v.Position).lookVector*x*1.5*(controlRange^3/1000), v.Position + CFrame.new(player.Character.Torso.Position, v.Position).lookVector*100)
- end
- end
- wait(.2)
- if t[1].Name == "Base" then
- repeat
- for _, v in ipairs(t) do
- v.Anchored = true
- v.CanCollide = true
- v.Size = v.Size - Vector3.new(.05, .2, .02)
- v.CFrame = CFrame.new(moons[_].Position + CFrame.new(player.Character.Torso.Position, moons[_].Position).lookVector*v.Size.X*1.5*(controlRange^3/1000), moons[_].Position + CFrame.new(player.Character.Torso.Position, moons[_].Position).lookVector*100)
- if v.Size == Vector3.new(.2,.2,.2) then
- v:Destroy()
- end
- end
- wait()
- until t[1].Size == Vector3.new(.2,.2,.2) or t[1].Name ~= "Base"
- for _, v in ipairs(t) do
- if v.Name == "Base" then
- v:Destroy()
- end
- end
- end
- end)
- elseif mClose == moons[10] then
- buttondown = true
- local p = Instance.new("Part", player.Character)
- p.Anchored = true
- p.BrickColor = BrickColor.new("Earth green")
- p.FormFactor = "Custom"
- p.Size = Vector3.new(0,0,0)
- local pInc = 0
- while buttondown do
- wait()
- p.Size = p.Size + Vector3.new(pInc, pInc, pInc)
- pInc = pInc + 1/90
- local pos = player.Character.Torso.Position + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*(p.Size.X/2*1.5+2)
- p.CFrame = CFrame.new(pos*Vector3.new(1,0,1) + Vector3.new(0,math.max(pos.Y, p.Size.Y/2),0), mouse.Hit.p*Vector3.new(1,0,1) + pos*Vector3.new(0,1,0))
- end
- p.Anchored = a
- p.Parent = workspace
- end
- end)
- else
- buttondown = true
- local x = Instance.new("Part", player.Character)
- x.Name = "Base"
- x.Anchored = true
- x.CanCollide = false
- x.TopSurface, x.BottomSurface = "Smooth", "Smooth"
- x.BrickColor = BrickColor.new("Bright violet")
- x.FormFactor = "Custom"
- while buttondown and sHand do
- local dist = (mouse.Hit.p-sHand.Position).magnitude
- if dist < 1000 and mouse.Target then
- x.Size = Vector3.new(1.5,1.5,dist)
- x.CFrame = CFrame.new(sHand.Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- x.Transparency = math.random(0, 100)/100
- x.Reflectance = math.random(0, 100)/100
- local p = game.Players:playerFromCharacter(mouse.Target) or game.Players:playerFromCharacter(mouse.Target.Parent)
- if p then
- local char = p.Character
- if char then
- local t = char:findFirstChild("Torso")
- if t then
- local l = t.CFrame.lookVector
- t.CFrame = CFrame.new(t.Position + CFrame.new(player.Character.Torso.Position, t.Position).lookVector, t.Position+l*20)
- end
- end
- elseif mouse.Target.Name ~= "Base" then
- mouse.Target.Anchored = false
- mouse.Target.Velocity = mouse.Target.Velocity + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*10
- end
- end
- wait()
- end
- x.Parent = nil
- end
- elseif mode == "Teleport" then
- if subM == 1 then
- for i = 1, 10 do
- if mouse.Target then
- Point(i, true)
- wait(1/30)
- end
- end
- if mouse.Target then
- player.Character:MoveTo(mouse.Hit.p)
- end
- elseif subM == 2 then
- local e = Instance.new("Part")
- e.Name = player.Name
- e.Parent = workspace
- e.Anchored = true
- e.CanCollide = false
- e.FormFactor = "Custom"
- e.TopSurface, e.BottomSurface = "Smooth", "Smooth"
- e.Size = Vector3.new(1,1,1)
- e.Transparency = 1
- e.BrickColor = BrickColor.new("Really black")
- local n = e:clone()
- local m = Instance.new("SpecialMesh", e)
- m.MeshType = "Sphere"
- e.CFrame = player.Character.Torso.CFrame
- player.Character.Torso.CFrame = player.Character.Torso.CFrame + (mouse.Hit.p + Vector3.new(0,2.5,0)) - player.Character.Torso.Position
- n.Parent = workspace
- n.CFrame = player.Character.Torso.CFrame
- local q = m:clone()
- q.Parent = n
- for i = 1, 0, -.1 do
- wait()
- m.Scale = Vector3.new(10,10,10)*i
- q.Scale = Vector3.new(10,10,10) - Vector3.new(10,10,10)*i
- n.Transparency = 1-i
- e.Transparency = i
- end
- e:Destroy()
- n:Destroy()
- end
- elseif mode == "Destroy" then
- local x = mouse.Target
- Point(1) Point(3) Point(5) Point(7) Point(9)
- for i = math.min(x.Transparency, 1), 1, .1 do
- pcall(function()
- if x.Name ~= "Base" and x.Name ~= "Terrain" and x.Name ~= player.Name then
- x.Transparency = i
- end
- end)
- wait(1/30)
- end
- pcall(function()
- if x.Name ~= "Base" and x.Name ~= "Terrain" and x.Name ~= player.Name then
- x:Destroy()
- end
- end)
- elseif mode == "Explode" then
- if subM == 1 then
- Point(1) Point(6)
- Delay(0, function()
- local FF = Instance.new("ForceField", player.Character)
- Instance.new("Explosion", workspace).Position = mouse.Hit.p
- wait(.1)
- pcall(function() FF:Destroy() end)
- end)
- elseif subM == 2 and not off[1] and not off[10] and mouse.Target then
- local p = mouse.Hit.p
- local pos = Vector3.new(0,0,0)
- for i = #moons, 1, -1 do
- off[i] = true
- Delay(0, function()
- for x = 1, 50 do
- moons[i].CFrame = CFrame.new(moons[i].Position:lerp(p + Vector3.new(0,15,0) + CFrame.Angles(0,math.rad(360/10*i),0).lookVector * 7, .05 ))
- wait()
- end
- pos = pos + moons[i].Position
- end)
- end
- wait(2)
- pos = pos/10
- local last = pos
- for i = 1, 10 do
- Delay(0, function()
- local q = Instance.new("Part", workspace)
- q.Anchored = true
- q.CanCollide = false
- q.FormFactor = "Custom"
- q.BrickColor = BrickColor.new("New Yeller")
- q.TopSurface, q.BottomSurface = "Smooth", "Smooth"
- local P = last - Vector3.new(math.random(-2, 2), 4, math.random(-2, 2))
- q.Size = Vector3.new(.2,.2,(last-P).magnitude)
- q.CFrame = CFrame.new(last:lerp(P, .5), P)
- last = P
- wait(.1)
- for a = 0, 1, .1 do
- wait(.1)
- q.Transparency = a
- end
- q:Destroy()
- end)
- end
- local e = Instance.new("Explosion", workspace)
- e.Position = p
- e.Hit:connect(function(q)
- pcall(function()
- Break(q)
- end)
- end)
- for i = #moons, 1, -1 do
- off[i] = true
- Delay(0, function()
- for x = 0, 1, .1 do
- moons[i].Transparency = x
- wait(.1)
- end
- off[i] = false
- for x = 1, 0, -.1 do
- moons[i].Transparency = x
- wait(.1)
- end
- end)
- end
- end
- elseif mode == "Attack" and not off[1] and not off[10] then
- for i = #moons, 1, -1 do
- off[i] = true
- Delay(0, function()
- local p = game.Players:playerFromCharacter(mouse.Target.Parent) or game.Players:playerFromCharacter(mouse.Target.Parent.Parent)
- local mHit = mouse.Hit.p
- local tHit = mouse.Target
- local hit = p and tHit.Position or mHit
- local x = moons[i]
- local ori = x.Position-player.Character.Torso.Position
- local dist = math.max(math.floor((hit - x.Position).magnitude/(13.5/2)+.5), 1)*13.5/2
- for n = 1, 100, 60/dist do
- local hit = p and tHit.Position or mHit
- x.CFrame = CFrame.new((ori+player.Character.Torso.Position):lerp(hit, n/100))
- pcall(function()
- if (x.Position - hit).magnitude <= 5 then
- pcall(function()
- p.Character.Humanoid:TakeDamage(3)
- p.Character.Humanoid.Sit = true
- end)
- end
- end)
- wait(1/30)
- end
- for n = 100, 0, -60/dist do
- local hit = p and tHit.Position or mHit
- x.CFrame = CFrame.new((ori+player.Character.Torso.Position):lerp(hit, n/100))
- wait(1/30)
- end
- off[i] = false
- end)
- wait(.2)
- end
- elseif mode == "Shoot" then
- for i = #moons, 1, -1 do
- wait(.2)
- Delay(0, function()
- for n = 1, 0, -.1 do
- moons[i].Reflectance = n
- wait(1/30)
- end
- end)
- Delay(0, function()
- local x = Instance.new("Part", workspace)
- x.Name = player.Name
- x.FormFactor = "Custom"
- x.BrickColor = BrickColor.new("Really red")
- x.Size = Vector3.new(.3,.3,2)
- x.Anchored = true
- x.CanCollide = false
- local m = Instance.new("SpecialMesh", x)
- m.MeshType = "Sphere"
- local hit = mouse.Hit.p
- local t = mouse.Target
- local p = game.Players:playerFromCharacter(t.Parent) or game.Players:playerFromCharacter(t.Parent.Parent)
- local dist = (moons[i].Position - hit).magnitude
- local ori = moons[i].Position
- x.CFrame = CFrame.new(ori, p and t.Position or hit)
- for w = 1, 100, 200/dist do
- local d = (x.Position - (p and t.Position or hit)).magnitude
- local tween = (x.CFrame.lookVector*d):lerp(p and t.Position or hit, .05)
- x.CFrame = CFrame.new(x.CFrame.p + CFrame.new(x.Position, p and t.Position or hit).lookVector*2, x.Position+tween)
- pcall(function()
- if (x.Position - t.Position).magnitude <= 5 then
- t.Parent.Humanoid:TakeDamage(1)
- t.Parent.Humanoid.Sit = true
- t.Velocity = t.Velocity + CFrame.new(player.Character.Torso.Position, t.Position).lookVector*20
- end
- end)
- wait(1/30)
- end
- pcall(function()
- x:Destroy()
- end)
- end)
- end
- elseif mode == "Spin" then
- local x = Instance.new("Part", player.Character)
- x.Anchored = true
- x.CanCollide = false
- x.BrickColor = BrickColor.new("Bright blue")
- x.FormFactor = "Symmetric"
- x.Size = Vector3.new(1,1,1)
- local m = Instance.new("SpecialMesh", x)
- m.MeshType = "Sphere"
- for n = 0, 30, .5 do
- wait(1/30)
- sSpeed = n/30*16+1
- x.CFrame = player.Character.Torso.CFrame
- m.Scale = Vector3.new(n,n,n)
- x.Transparency = .5+(.5*n/30)
- if math.random(1, 3) == 1 then
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v ~= player and v.Character then
- local c = v.Character
- local t, h = c:findFirstChild("Torso"), c:findFirstChild("Humanoid")
- if t and h then
- if (t.Position - player.Character.Torso.Position).magnitude <= n/2 then
- Delay(0, function()
- h.Sit = true
- t.Velocity = t.Velocity + CFrame.new(player.Character.Torso.Position, t.Position).lookVector*20
- wait(1)
- h.Sit = false
- end)
- end
- end
- end
- end
- end
- end
- for n = 0, 15, .5 do
- sSpeed = (15-n)/15*16 + 1
- wait(1/30)
- end
- elseif mode == "Spike" and (sSpeed == 1 or sSpeed == 11) then
- spiked = not spiked
- if not spiked then
- for _, v in ipairs(player.Character:GetChildren()) do
- if v.Name == "Spike" then
- v:Destroy()
- end
- end
- for n = 0, 15, .5 do
- wait(1/30)
- sSpeed = (15-n)/15*10 + 1
- end
- else
- local e = Instance.new("Part")
- e.FormFactor = "Custom"
- e.BrickColor = BrickColor.new("Really black")
- e.Name = "Spike"
- e.Size = Vector3.new(1,1.5,1)
- e.CanCollide = false
- local m = Instance.new("SpecialMesh", e)
- m.MeshType = "FileMesh"
- m.MeshId = "http://www.roblox.com/asset/?id=1778999"
- for _, v in ipairs(moons) do
- local x = e:clone()
- x.Parent = player.Character
- local w = Instance.new("Weld", x)
- w.Part0 = x
- w.Part1 = v
- x.Touched:connect(function(hit)
- Break(hit)
- end)
- x.Reflectance = v.Reflectance
- v.Changed:connect(function(ch)
- if ch == "Reflectance" then
- x.Reflectance = v.Reflectance
- end
- end)
- Delay(0, function()
- for n = 0, math.huge, .5 do
- local A = v.Position+CFrame.new(player.Character.Torso.Position, v.Position).lookVector*1.5*math.min(n,30)/30
- local cf = CFrame.new(A, v.Position+CFrame.new(player.Character.Torso.Position, v.Position).lookVector*10)*CFrame.Angles(math.rad(-90),0,0)
- w.C0 = cf:inverse()
- w.C1 = v.CFrame:inverse()
- x.Mesh.Scale = Vector3.new(.77,1.5/30*math.min(n,30),.77)
- wait(1/30)
- end
- end)
- end
- for n = 0, 30, .5 do
- wait(1/30)
- sSpeed = n/30*10+1
- end
- end
- elseif mode == "Smash" and not off[1] and not off[10] then
- for i = #moons, 1, -1 do
- off[i] = true
- Delay(0, function()
- local p = game.Players:playerFromCharacter(mouse.Target.Parent) or game.Players:playerFromCharacter(mouse.Target.Parent.Parent)
- local mHit = mouse.Hit.p
- local tHit = mouse.Target
- local hit = p and tHit.Position or mHit
- local x = moons[i]
- local ori = x.Position
- for n = 1, 100, 10 do
- x.CFrame = CFrame.new(ori:lerp(ori*Vector3.new(1,0,1)+Vector3.new(0,1,0), n/100))
- wait(1/30)
- end
- Delay(0, function()
- if i == 1 then
- local e = Instance.new("Part", player.Character)
- e.Name = "Base"
- e.Anchored = true
- e.CanCollide = false
- e.FormFactor = "Symmetric"
- e.BrickColor = BrickColor.new("Institutional white")
- e.Transparency = 1
- e.TopSurface, e.BottomSurface = "Smooth", "Smooth"
- local decal = Instance.new("Decal", e)
- decal.Face = "Top"
- if subM == 1 then
- decal.Texture = "http://www.roblox.com/asset/?id=2011007"
- elseif subM == 2 then
- decal.Texture = "http://www.roblox.com/asset/?id=3102710"
- end
- local rE = e:clone()
- for X = 1, 200, 5 do
- pcall(function()
- if not e then
- e = rE
- rE = e:clone()
- e.Parent = player.Character
- end
- end)
- e.Size = Vector3.new(X,1,X)
- e.CFrame = player.Character.Torso.CFrame - Vector3.new(0,3,0)
- Push(workspace, X, subM == 2 and "break" or nil)
- wait(1/30)
- end
- pcall(function()
- e:Destroy()
- end)
- end
- end)
- wait(1/30*30)
- for n = 1, 100, 10 do
- x.CFrame = CFrame.new(ori:lerp(ori*Vector3.new(1,0,1), (100-n)/100))
- wait(1/30)
- end
- off[i] = false
- end)
- wait(1/30)
- end
- elseif mode == "Platform" then
- if subM == 1 then
- if player:findFirstChild("Platform") or platform then
- if platform then
- pcall(function() platform:Destroy() end)
- platform = nil
- end
- if player:findFirstChild("Platform") then
- player:findFirstChild("Platform"):Destroy()
- end
- else
- local p = Instance.new("ObjectValue", player)
- p.Name = "Platform"
- Instance.new("IntValue", p).Name = "Platform"
- platform = Instance.new("Part", player.Character)
- platform.Name = "Base"
- platform.Anchored = true
- platform.BrickColor = BrickColor.new("Institutional white")
- platform.FormFactor = "Custom"
- platform.Transparency = 1
- Instance.new("CylinderMesh", platform)
- p.Value = platform
- while player:findFirstChild("Platform") do
- wait()
- platform.Parent = player.Character
- platform.Size = Vector3.new(pL/100*20, 0, pL/100*20)
- platform.CFrame = CFrame.new(player.Character.Torso.Position - Vector3.new(0,3.05,0))
- end
- pcall(function() platform:Destroy() end)
- end
- elseif subM == 2 then
- local e = Instance.new("Part")
- e.Anchored = true
- e.BrickColor = BrickColor.new("Really black")
- e.TopSurface, e.BottomSurface = "Smooth", "Smooth"
- e.FormFactor = "Symmetric"
- e.Size = Vector3.new(8,1,8)
- e.Name = "Plate"
- e.Transparency = .8
- buttondown = true
- Delay(0, function()
- while buttondown do
- wait(.1)
- local count = 0
- for _, v in ipairs(player.Character:GetChildren()) do
- count = count + (v.Name == "Plate" and 1 or 0)
- end
- local x = e:clone()
- x.Parent = player.Character
- x.CFrame = CFrame.new((player.Character.Torso.Position - Vector3.new(0,3.5,0)), mouse.Hit.p)
- Delay(2, function() x:Destroy() end)
- end
- end)
- end
- elseif mode == "Laser" and not laser then
- laser = true
- local moved = false
- local m1p = moons[1].Position
- local ShootLaser = function(middle, v, point)
- local x = Instance.new("Part", player.Character)
- x.Name = "Base"
- x.FormFactor = "Custom"
- x.BrickColor = BrickColor.new("Really blue")
- x.TopSurface, x.BottomSurface = "Smooth", "Smooth"
- x.Anchored = true
- x.CanCollide = false
- local look1 = CFrame.new(middle, point or v.Position)
- local w, p
- for i = 1, 3 do
- w, p = workspace:FindPartOnRay(Ray.new(v.Position, look1.lookVector*200), player.Character)
- if w then
- local P = game.Players:playerFromCharacter(w.Parent) or game.Players:playerFromCharacter(w.Parent.Parent)
- if P and i == 1 then
- pcall(function()
- if (w.Position - P.Character.Torso.Position).magnitude <= 5 then
- P.Character.Humanoid.Health = P.Character.Humanoid.Health - P.Character.Humanoid.MaxHealth/10
- end
- end)
- elseif not P and ((w.Size.x + w.Size.y + w.Size.z)/3)^3 > 4^3 then
- Break(w)
- elseif not P then
- w:Destroy()
- end
- end
- end
- p = p or v.Position + look1.lookVector*200
- local a = CFrame.new(v.Position:lerp(p, .5), p)
- x.Size = Vector3.new(.3,.3,(v.Position - p).magnitude)
- x.CFrame = a
- for i = 0, 1, .2 do
- pcall(function() x.Transparency = i end)
- wait(.1)
- end
- pcall(function() x:Destroy() end)
- end
- if subM == 1 then
- for rep = 1, 30 do
- wait(.1)
- local middle = Vector3.new(0,0,0)
- for _, v in ipairs(moons) do
- middle = middle + v.Position
- end
- middle = middle / 10
- for _, v in ipairs(moons) do
- Delay(0, function()
- ShootLaser(middle, v)
- end)
- end
- end
- elseif subM == 2 then
- buttondown = true
- for i = 1, #moons do
- off[i] = true
- end
- local T = player.Character.Torso
- local rot = 0
- local outq = 0
- local outa = .1
- local outq2 = 0
- local outa2 = .1
- local lines = {}
- for i = 1, 9 do
- local e = Instance.new("Part", player.Character)
- e.Anchored = true
- e.CanCollide = false
- e.FormFactor = "Custom"
- e.BrickColor = BrickColor.new("Really blue")
- e.Name = "Base"
- e.Size = Vector3.new(0,0,0)
- e.TopSurface, e.BottomSurface = "Smooth", "Smooth"
- table.insert(lines, e)
- end
- while buttondown do
- rot=rot+1
- outq = outq + outa
- outq2 = outq2 + outa2
- if outq >= 3 or outq <= 0 then
- outa = -outa
- end
- if outq2 >= 2 or outq2 <= 0 then
- outa2 = -outa2
- end
- local p = m1p
- moons[1].CFrame = CFrame.new(T.Position + CFrame.new(T.Position, mouse.Hit.p).lookVector * 5)
- for i = 2, #moons do
- moons[i].CFrame = moons[1].CFrame + (CFrame.new(player.Character.Torso.Position, moons[1].Position)*CFrame.Angles(0,math.rad(90),0)*CFrame.Angles(math.rad(360/9*(i-1) + rot*10),0,0)).lookVector*(3+outq)
- moons[i].CFrame = moons[i].CFrame + CFrame.new(moons[i].Position, player.Character.Torso.Position).lookVector*outq2
- lines[i-1].Size = Vector3.new(.2,.2,(moons[i].Position - moons[1].Position).magnitude)
- lines[i-1].CFrame = CFrame.new(moons[i].Position:lerp(moons[1].Position, .5), moons[1].Position)
- end
- Delay(0, function() ShootLaser(T.Position, moons[1], mouse.Hit.p) end)
- wait()
- end
- for i = 1, #moons do
- off[i] = false
- pcall(function() lines[i]:Destroy() lines[i] = nil end)
- end
- end
- laser = false
- elseif mode == "Sword" and player.Character:findFirstChild("Right Arm") and sword ~= "busy" and sword ~= "busyF" then
- local give = function(id)
- local x = game:GetService("InsertService"):LoadAsset(id)
- for _, v in ipairs(x:GetChildren()) do
- if v:IsA("Accoutrement") then
- pcall(function() v.Parent = player.Character end)
- return v
- elseif v:IsA("Tool") or v:IsA("HopperBin") then
- pcall(function() v.Parent = player.Backpack end)
- return v
- end
- end
- return x
- end
- local ra = player.Character:findFirstChild("Right Arm")
- sword = sword and "busyF" or "busy"
- if sword == "busy" then
- for i = #moons, 1, -1 do
- off[i] = true
- Delay(0, function()
- local x = moons[i]
- local ori = x.Position-player.Character.Torso.Position
- for n = 1, 100, 5 do
- local pos = ra.Position - (ra.CFrame*CFrame.Angles(math.rad(90),0,0)).lookVector + ra.CFrame.lookVector * i/2
- local hit = p and tHit.Position or mHit
- x.CFrame = CFrame.new((ori+player.Character.Torso.Position):lerp(pos, n/100))
- wait(1/30)
- end
- Delay(.5, function()
- for e = 0, 1, .1 do
- wait()
- x.Transparency = e
- end
- end)
- repeat
- wait()
- x.CFrame = CFrame.new(ra.Position - (ra.CFrame*CFrame.Angles(math.rad(90),0,0)).lookVector + ra.CFrame.lookVector * i/2)
- until sword == "busyF"
- pcall(function() player.Backpack.Darkheart:remove() end)
- for e = 1, 0, -.1 do
- wait()
- x.Transparency = e
- end
- for n = 100, 0, -5 do
- local pos = ra.Position - (ra.CFrame*CFrame.Angles(math.rad(90),0,0)).lookVector + ra.CFrame.lookVector * i/2
- x.CFrame = CFrame.new((ori+player.Character.Torso.Position):lerp(pos, n/100))
- wait(1/30)
- end
- sword = false
- off[i] = false
- end)
- end
- wait(100/30/5)
- sword = true
- local e = give(16895215)
- local S = NS:clone()
- local ds = S:findFirstChild("DSource") or Instance.new("StringValue", S)
- ds.Name = "DSource"
- ds.Value = 'local player = game.Players:playerFromCharacter(script.Parent.Parent) or script.Parent.Parent.Parent script.Parent.Equipped:connect(function(mouse) mouse.KeyDown:connect(function(key) if key == "q" then player.Character.Humanoid.Jump = true for _, v in ipairs(player.Backpack:GetChildren()) do pcall(function() v.Active = true end) end script.Parent.Parent = player.Backpack end end) end)'
- S.Parent = e
- e.Parent = player.Character
- e.Handle.Touched:connect(function(hit)
- pcall(function()
- hit.Parent.Humanoid.MaxHealth = 100
- end)
- pcall(function()
- hit.Parent.Parent.Humanoid.MaxHealth = 100
- end)
- end)
- local asd = "Ena".."bled"
- e[asd] = true
- bin1.Active = false
- end
- elseif mode == "Chaos" then
- chaos = not chaos
- if chaos then
- n2 = 0
- for i = 0, 1, .01 do
- for _, v in ipairs(moons) do
- v.Reflectance = i
- end
- wait()
- end
- else
- n2 = n2%360
- local ori = 360-n2
- local inc = 1/5
- repeat
- n2=n2+inc
- inc = inc + 1/500
- for _, v in ipairs(moons) do
- v.Reflectance = (360-n2)/ori
- end
- wait()
- until n2 >= 360
- for _, v in ipairs(moons) do
- v.Reflectance = 0
- end
- n2 = 0
- end
- elseif mode == "Telekinesis" and mouse.Target then
- local targ = mouse.Target
- if targ.Name ~= "Base" and targ.ClassName ~= "Terrain" and not targ.Anchored then
- for _, v in ipairs(targ:GetChildren()) do
- if v.ClassName:find("Body") then
- v:remove()
- end
- end
- local par = targ.Parent
- if not game.Players:playerFromCharacter(targ.Parent) and not game.Players:playerFromCharacter(targ.Parent.Parent) and not game.Players:playerFromCharacter(targ.Parent.Parent.Parent) and targ.Name ~= "NoDestroy" then
- targ.Parent = player.Character
- end
- local p = Instance.new("BodyPosition", targ)
- p.Name = "BodyPosition"..player.Name
- p.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- buttondown = true
- local d = (targ.Position - player.Character.Torso.Position).magnitude
- p.position = player.Character.Torso.Position + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*d
- local f1 = Instance.new("Fire", player.Character["Right Arm"])
- f1.Size = 3
- f1.Heat = -15
- f1.Color = BrickColor.new("Really blue").Color
- f1.SecondaryColor = BrickColor.new("Lime green").Color
- teleK = true
- local keydown = false
- local keyup = mouse.KeyUp:connect(function()
- keydown = false
- end)
- local keydown = mouse.KeyDown:connect(function(key)
- keydown = true
- if key == "q" then
- Delay(0, function()
- while keydown do
- d=math.max(d-1, 5)
- wait()
- end
- end)
- elseif key == "e" then
- Delay(0, function()
- while keydown do
- d=d+1
- wait()
- end
- end)
- elseif key == "x" then
- targ.Parent = par
- p.Parent = nil
- Break(targ)
- buttondown = false
- elseif key == "r" then
- local e = Instance.new("Explosion")
- e.Position = targ.Position
- e.Parent = workspace
- end
- end)
- while buttondown do
- wait()
- if not p then
- buttondown = false
- else
- p.position = player.Character.Torso.Position + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*d
- end
- end
- if targ.Name ~= "NoDestroy" and targ.Parent == player.Character then
- targ.Parent = par
- end
- keyup:disconnect()
- keydown:disconnect()
- keydown = false
- p:remove()
- teleK = false
- f1:remove()
- end
- elseif mode == "Cannon" then
- if mouse.Target and subM == 1 then
- cannon = true
- Delay(0, function()
- local RA = player.Character["Right Arm"]
- local LA = player.Character["Left Arm"]
- local part = Instance.new("Part")
- part.Name = "Base"
- part.Anchored = true
- part.CanCollide = false
- part.FormFactor = "Custom"
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.BrickColor = BrickColor.new("Really blue")
- local p1, p2 = part:clone(), part:clone()
- p1.Parent, p2.Parent = player.Character, player.Character
- p1.Size = Vector3.new(.3,.3,(RA.Position - mouse.Hit.p).magnitude)
- p2.Size = Vector3.new(.3,.3,(LA.Position - mouse.Hit.p).magnitude)
- p1.CFrame = CFrame.new(RA.Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- p2.CFrame = CFrame.new(LA.Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- Break(mouse.Target)
- local C = mouse.Hit.p
- local N = part:clone()
- N.Size = Vector3.new(1,1,1)
- N.CFrame = CFrame.new(C)
- local m = Instance.new("SpecialMesh", N)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(1,1,1)
- N.Parent = player.Character
- local N2 = N:clone()
- N2.BrickColor = BrickColor.new("Bright blue")
- N.Touched:connect(function(hit)
- if game.Players:playerFromCharacter(hit.Parent) or game.Players:playerFromCharacter(hit.Parent.Parent) then
- Break(hit)
- end
- end)
- N2.Parent = player.Character
- for i = 0, 1, 1/30 do
- wait()
- p1.Transparency, p2.Transparency = i*2, i*2
- N.Size = N.Size + Vector3.new(1,1,1)/30*8
- N2.Size = N.Size/2
- N.CFrame = CFrame.new(C + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N2.CFrame = CFrame.new(C + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N.Transparency = i*1.5
- N2.Transparency = i
- end
- p1:Destroy()
- p2:Destroy()
- N:Destroy()
- N2:Destroy()
- end)
- elseif subM == 2 then
- buttondown = true
- cannon = true
- local RA = player.Character["Right Arm"]
- local LA = player.Character["Left Arm"]
- local part = Instance.new("Part")
- part.Name = "Base"
- part.Anchored = true
- part.CanCollide = false
- part.FormFactor = "Custom"
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.BrickColor = BrickColor.new("Really red")
- local p1, p2 = part:clone(), part:clone()
- p1.Parent, p2.Parent = player.Character, player.Character
- local N = part:clone()
- N.Size = Vector3.new(1,1,1)
- local m = Instance.new("SpecialMesh", N)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(1,1,1)
- N.Parent = player.Character
- local N2 = N:clone()
- N2.BrickColor = BrickColor.new("Bright red")
- N.Touched:connect(function(hit)
- if game.Players:playerFromCharacter(hit.Parent) or game.Players:playerFromCharacter(hit.Parent.Parent) then
- Break(hit)
- end
- end)
- N2.Parent = player.Character
- while buttondown and mouse.Target do
- wait()
- local targ = mouse.Target
- if targ and (player.Character.Torso.Position - mouse.Hit.p).magnitude < 1000 then
- pcall(function()
- for x, y in ipairs(targ:GetChildren()) do
- if y.ClassName:find("Body") and targ.Name ~= "Base" then
- y:Destroy()
- end
- end
- end)
- if ((targ.Size.x + targ.Size.y + targ.Size.z)/3)^3 > 5^3 and targ.Name ~= "Base" then
- Break(targ)
- elseif targ.Name ~= "Base" then
- Delay(0, function()
- local S = NS:clone()
- local ds = S:findFirstChild("DSource") or Instance.new("StringValue", S)
- ds.Name = "DSource"
- local obj = Instance.new("ObjectValue", S)
- obj.Name = "Object"
- obj.Value = targ
- ds.Value = "pcall(function() script.Object.Value:Destroy() end) script.Parent = nil"
- S.Parent = workspace
- S.Disabled = true
- wait()
- S.Disabled = false
- end)
- end
- local C = mouse.Hit.p
- N.Size = Vector3.new(1,1,1)*math.random(0, 80)/10
- N2.Size = Vector3.new(1,1,1)*math.random(0, 40)/10
- N.CFrame = CFrame.new(C + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N2.CFrame = CFrame.new(C + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N.Transparency = (N.Transparency + 1/30)%1
- N2.Transparency = N.Transparency/1.5
- p1.Size = Vector3.new(.3,.3,(RA.Position - mouse.Hit.p).magnitude)
- p2.Size = Vector3.new(.3,.3,(LA.Position - mouse.Hit.p).magnitude)
- p1.CFrame = CFrame.new(RA.Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- p2.CFrame = CFrame.new(LA.Position:lerp(mouse.Hit.p, .5), mouse.Hit.p)
- end
- end
- p1:Destroy()
- p2:Destroy()
- N:Destroy()
- N2:Destroy()
- cannon = false
- elseif subM == 3 and mouse.Target then
- cannon = true
- Delay(0, function()
- local RA = player.Character["Right Arm"]
- local LA = player.Character["Left Arm"]
- local part = Instance.new("Part")
- part.Anchored = true
- part.CanCollide = false
- part.FormFactor = "Custom"
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.BrickColor = BrickColor.new("Toothpaste")
- local p1, p2 = part:clone(), part:clone()
- p1.Parent, p2.Parent = player.Character, player.Character
- p1.Size = Vector3.new(.3,.3,1.5)
- p2.Size = Vector3.new(.3,.3,1.5)
- p1.CFrame = RA.CFrame
- p2.CFrame = LA.CFrame
- local C = mouse.Hit.p
- local targ = mouse.Target
- local CTDist = (C-targ.Position).magnitude
- local RA1, LA1 = RA.Position, LA.Position
- local Touched = false
- local damage = function(hit)
- if hit.Parent ~= player.Character and hit.Parent.Parent ~= player.Character then
- pcall(function()
- local h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if h then
- h.MaxHealth = math.min(1e10, math.max(h.MaxHealth, 1))
- h:TakeDamage(h.MaxHealth*.15)
- end
- end)
- Touched = true
- end
- end
- p1.Touched:connect(damage)
- p2.Touched:connect(damage)
- local targ = mouse.Target
- local diff = (targ.Position - C).magnitude
- for i = 0, 1, 1/(player.Character["Torso"].Position - C).magnitude*4 do
- if not Touched then
- pcall(function()
- p1.CFrame = CFrame.new(RA1:lerp(C, i), C)
- p2.CFrame = CFrame.new(LA1:lerp(C, i), C)
- end)
- wait()
- end
- end
- if targ then
- if math.abs((targ.Position - C).magnitude - diff) < 5 then
- damage(targ)
- end
- end
- for i = 0, 1, 1/10 do
- wait()
- pcall(function()
- local x1, x2 = p1.CFrame, p2.CFrame
- p1.Size = p1.Size + Vector3.new(.2,.2,.2)
- p2.Size = p1.Size
- p1.CFrame = x1*CFrame.Angles(math.random(0, 100), math.random(0, 100), math.random(0, 100))
- p2.CFrame = x2*CFrame.Angles(math.random(0, 100), math.random(0, 100), math.random(0, 100))
- p1.Transparency = i
- p2.Transparency = i
- end)
- end
- pcall(function()
- p1:Destroy()
- p2:Destroy()
- end)
- end)
- elseif subM == 4 and mouse.Target then
- Delay(0, function()
- buttondown = true
- local p = Instance.new("Part", player.Character)
- p.FormFactor = "Custom"
- p.Size = Vector3.new(1,1,1)
- p.BrickColor = BrickColor.new("Black")
- p.CanCollide = false
- p.Anchored = true
- p.TopSurface, p.BottomSurface = "Smooth", "Smooth"
- local m = Instance.new("SpecialMesh", p)
- m.MeshType = "Sphere"
- local bv = Instance.new("BodyVelocity")
- bv.Name = "BodyVelocity"..player.Name
- bv.Parent = p
- bv.maxForce = Vector3.new(1e10, 1e10, 1e10)
- cannon = true
- local pInc = 1/3
- while buttondown do
- wait()
- p.Size = p.Size + Vector3.new(pInc, pInc, pInc)
- pInc = pInc + 1/60
- p.CFrame = CFrame.new(player.Character.Torso.Position + CFrame.new(player.Character.Torso.Position, mouse.Hit.p).lookVector*(p.Size.X/2+2))
- p.Transparency = p:GetMass()^(1/3) / 100
- if p.Transparency > .8 then
- p:Destroy()
- end
- end
- cannon = false
- if p then
- p.Anchored = false
- local mP = mouse.Hit.p
- p.Touched:connect(function(hit)
- local pos = p.Position + CFrame.new(p.Position, hit.Position).lookVector*(p.Size.X/2)
- if (pos - player.Character.Torso.Position).magnitude > 8 then
- if hit:GetMass() > p:GetMass() then
- Break(hit)
- end
- local ex = Instance.new("Explosion", workspace)
- ex.Position = pos
- end
- end)
- local ori = p.Position
- for i = 16+(p:GetMass()^(1/3)/80)*16, 40 do
- bv.velocity = CFrame.new(ori, mP).lookVector*i
- wait(1/(i/40*30))
- end
- Delay(20, function() pcall(function() p:Destroy() end) end)
- end
- end)
- elseif subM == 5 then
- local RA, LA = player.Character["Right Arm"], player.Character["Left Arm"]
- local t = {}
- for _, v in ipairs(workspace:GetChildren()) do
- if v:IsA("BasePart") and v.Name ~= "Terrain" and v.Name ~= "Base" then
- table.insert(t, v)
- end
- end
- local close, obj = math.huge, nil
- for _, v in ipairs(t) do
- local dist = (hp1 - v.Position).magnitude
- if close > dist and v ~= obj2 then
- close, obj = dist, v
- end
- end
- local close2, obj2 = math.huge, nil
- for _, v in ipairs(t) do
- local dist = (hp2 - v.Position).magnitude
- if close2 > dist and v ~= obj then
- close2, obj2 = dist, v
- end
- end
- local part = Instance.new("Part")
- part.Name = "Base"
- part.Anchored = true
- part.CanCollide = false
- part.FormFactor = "Custom"
- part.TopSurface, part.BottomSurface = "Smooth", "Smooth"
- part.BrickColor = BrickColor.new("Really red")
- local p1, p2 = player.Character:findFirstChild("P1") or part:clone(), player.Character:findFirstChild("P2") or part:clone()
- p1.Name, p2.Name = "P1", "P2"
- p1.Parent, p2.Parent = player.Character, player.Character
- local N = player.Character:findFirstChild("N") or part:clone()
- N.Name = "N"
- N.Size = Vector3.new(1,1,1)
- local m = Instance.new("SpecialMesh", N)
- m.MeshType = "Sphere"
- m.Scale = Vector3.new(1,1,1)
- N.Parent = player.Character
- local N2 = player.Character:findFirstChild("N2") or N:clone()
- N2.Name = "N2"
- N2.BrickColor = BrickColor.new("Bright red")
- N.Touched:connect(function(hit)
- if game.Players:playerFromCharacter(hit.Parent) or game.Players:playerFromCharacter(hit.Parent.Parent) then
- Break(hit)
- end
- end)
- N2.Parent = player.Character
- hp1, hp2 = mouse.Hit.p, mouse.Hit.p
- if mouse.Target then
- if mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Terrain" then
- obj = mouse.Target
- end
- end
- if not hp1x and not hp2x then
- hp1x = obj and true or false
- hp2x = obj2 and true or false
- repeat wait() until (obj and obj2) or subM ~= 5 or mode ~= "Cannon"
- local char = player.Character
- while CsubM == 5 and Cmode == "Cannon" and player.Character == char do
- wait()
- if obj then
- hp1 = hp1:lerp(obj.Position, .2)
- end
- if obj2 then
- hp2 = hp2:lerp(obj2.Position, .2)
- end
- local XX, YY = "nil", "nil"
- pcall(function() XX = obj.Parent.Name end)
- pcall(function() YY = obj2.Parent.Name end)
- if math.random(1, 10) == 1 then XX = "nil" end
- if math.random(1, 10) == 1 then YY = "nil" end
- if XX == "nil" then
- local t = {}
- for _, v in ipairs(workspace:GetChildren()) do
- if v:IsA("BasePart") and v.Name ~= "Terrain" and v.Name ~= "Base" and not v:findFirstChild("NS") then
- table.insert(t, v)
- end
- end
- close, obj = math.huge, nil
- for _, v in ipairs(t) do
- local dist = (v.Position - hp1).magnitude
- if dist < close and v ~= obj2 and v ~= obj then
- close, obj = dist, v
- end
- end
- end
- if YY == "nil" then
- local t = {}
- for _, v in ipairs(workspace:GetChildren()) do
- if v:IsA("BasePart") and v.Name ~= "Terrain" and v.Name ~= "Base" then
- table.insert(t, v)
- end
- end
- close2, obj2 = math.huge, nil
- for _, v in ipairs(t) do
- local dist = (v.Position - hp2).magnitude
- if dist < close2 and v ~= obj and v ~= obj2 then
- close2, obj2 = dist, v
- end
- end
- end
- local look1 = CFrame.new(LA.Position, hp1)
- local look2 = CFrame.new(RA.Position, hp2)
- local targ1, pos1 = workspace:FindPartOnRay(Ray.new(LA.Position, look1.lookVector*math.min(500, (LA.Position - hp1).magnitude)), player.Character)
- local targ2, pos2 = workspace:FindPartOnRay(Ray.new(RA.Position, look2.lookVector*math.min(500, (RA.Position - hp2).magnitude)), player.Character)
- local T = {targ1, targ2}
- for _, targ in ipairs(T) do
- if targ then
- if obj then
- if targ == obj then obj = nil end
- end
- if obj2 then
- if targ == obj2 then obj2 = nil end
- end
- end
- if targ.Name ~= "Base" and targ.Name ~= "Terrain" and targ.Name ~= "Laser" then
- if targ == targ1 then
- obj = targ1
- hp1 = LA.Position + CFrame.new(LA.Position, hp1).lookVector * (LA.Position - obj.Position).magnitude
- elseif targ == targ2 then
- obj2 = targ2
- hp2 = RA.Position + CFrame.new(RA.Position, hp2).lookVector * (RA.Position - obj2.Position).magnitude
- end
- end
- if ((targ.Size.x + targ.Size.y + targ.Size.z)/3)^3 > 5^3 then
- Break(targ)
- else
- Delay(0, function()
- if targ then
- local S = NS:clone()
- local ds = S:findFirstChild("DSource") or Instance.new("StringValue", S)
- ds.Name = "DSource"
- local obj = Instance.new("ObjectValue", S)
- obj.Name = "Object"
- obj.Value = targ
- ds.Value = "pcall(function() script.Object.Value:Destroy() end) script.Parent = nil"
- S.Parent = workspace
- S.Disabled = true
- wait()
- S.Disabled = false
- end
- end)
- end
- end
- pcall(function()
- local C = hp1
- local C2 = hp2
- N.Size = Vector3.new(1,1,1)*math.random(0, 80)/10
- N2.Size = Vector3.new(1,1,1)*math.random(0, 40)/10
- N.CFrame = CFrame.new(C + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N2.CFrame = CFrame.new(C2 + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))/10)
- N.Transparency = (N.Transparency + 1/30)%1
- N2.Transparency = N.Transparency/1.5
- p1.Size = Vector3.new(.3,.3,(RA.Position - hp1).magnitude)
- p2.Size = Vector3.new(.3,.3,(LA.Position - hp2).magnitude)
- p1.CFrame = CFrame.new(RA.Position:lerp(hp1, .5), hp1)
- p2.CFrame = CFrame.new(LA.Position:lerp(hp2, .5), hp2)
- end)
- end
- p1.Parent = nil
- p2.Parent = nil
- N.Parent = nil
- N2.Parent = nil
- hp1x = false
- hp2x = false
- else
- hp1 = mouse.Hit.p
- hp2 = mouse.Hit.p
- end
- end
- end
- end
- end
- mouse.Button1Down:connect(Click)
- end)
- ]]
- Local.Parent = ply.Backpack
- repeat Local.Disabled = false wait() until not Local.Disabled
- end
- end
- ringconnection = game:GetService("Players").DescendantAdded:connect(function(v)
- if v.Name == "addring" then
- local P = game.Players:findFirstChild(v.Value)
- v:Destroy()
- if P then
- Tools(P)
- end
- end
- end)
- function Add(c)
- Tools(c)
- if c.Name ~= player.Name then Chat("reset") return end
- local notThere = 0
- repeat wait() notThere = notThere + 1 until c.Parent == workspace or notThere > 3
- repeat wait() until c:findFirstChild("Torso") or c.Parent ~= workspace
- if player.CharacterAppearance == "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=17622580" then Chat("emp") end
- repeat wait() until c:findFirstChild("Humanoid") or c.Parent ~= workspace
- pcall(function() player.PlayerGui.ScreenGui.cmd:Destroy() end)
- function Panel(x, y, text)
- local gui = player.PlayerGui:findFirstChild("cmd") or Instance.new("ScreenGui", player.PlayerGui)
- gui.Name = "cmd"
- local box1 = Instance.new("TextBox", gui)
- box1.Size = UDim2.new(.15, 0, 0, 20)
- box1.Position = UDim2.new(.2*x, 0, 0, 20*y)
- box1.Text = text
- box1.ClearTextOnFocus = false
- box1.ZIndex = -math.huge
- box1.BackgroundTransparency = .1
- submit1 = Instance.new("TextButton", gui)
- submit1.Size = UDim2.new(.05, 0, 0, 20)
- submit1.Position = UDim2.new(.2*x + .15, 0, 0, 20*y)
- submit1.Text = "Submit"
- submit1.MouseButton1Down:connect(function()
- Chat(box1.Text)
- end)
- submit1.ZIndex = -math.huge
- submit1.BackgroundTransparency = .1
- end
- Panel(0, 0, "field") Panel(1, 0, "ff") Panel(2, 0, "health/me/1e100") Panel(3, 0, "reset")
- Panel(0, 1, "field/30/true") Panel(1, 1, "tele/me") Panel(2, 1, "base") Panel(3, 1, "clear;lighting;base;spawns")
- Panel(0, 2, "part") Panel(1, 2, "tele/all") Panel(2, 2, "restart") Panel(3, 2, "lighting")
- local gui = player.PlayerGui:findFirstChild("cmd") or Instance.new("ScreenGui", player.PlayerGui)
- gui.Name = "cmd"
- local box1 = Instance.new("TextBox", gui)
- box1.Size = UDim2.new(.3, 0, 0, 20)
- box1.Position = UDim2.new(.45, 0, 0, 20*3)
- box1.Text = ""
- box1.ClearTextOnFocus = false
- box1.ZIndex = -math.huge
- box1.BackgroundTransparency = .1
- local submit1 = Instance.new("TextButton", gui)
- submit1.Size = UDim2.new(.05, 0, 0, 20)
- submit1.Position = UDim2.new(.2*4 - .05, 0, 0, 20*3)
- submit1.Text = "Chat"
- submit1.MouseButton1Down:connect(function()
- Chat("chat/"..box1.Text)
- end)
- submit1.ZIndex = -math.huge
- submit1.BackgroundTransparency = .1
- local clear1 = submit1:clone()
- clear1.Parent = gui
- clear1.Position = UDim2.new(.4, 0, 0, 20*3)
- clear1.MouseButton1Down:connect(function()
- box1.Text = ""
- local e = box1:clone()
- e.Parent = box1.Parent
- box1:Destroy()
- box1 = e
- end)
- clear1.Text = "Clear"
- local float = Instance.new("ScreenGui", player.PlayerGui)
- float.Name = "Float"
- local P = Instance.new("BodyPosition")
- P.Name = "BodyPosition"..player.Name
- P.Parent = player.Character.Torso
- P.maxForce = Vector3.new(0,0,0)
- local PF1, PF2, PF3, PF4 = Instance.new("Fire"), Instance.new("Fire"), Instance.new("Fire"), Instance.new("Fire")
- PF1.Heat, PF2.Heat, PF3.Heat, PF4.Heat = -30, -30, -30, -30
- PF1.Color, PF2.Color, PF3.Color, PF4.Color = BrickColor.new("Really blue").Color, BrickColor.new("Really blue").Color, BrickColor.new("Really blue").Color, BrickColor.new("Really blue").Color
- PF1.SecondaryColor, PF2.SecondaryColor, PF3.SecondaryColor, PF4.SecondaryColor = BrickColor.new("Lime green").Color, BrickColor.new("Lime green").Color, BrickColor.new("Lime green").Color, BrickColor.new("Lime green").Color
- PF1.Size, PF2.Size, PF3.Size, PF4.Size = 1,1,1,1
- function dis(bool)
- for _, v in ipairs(player.Character:GetChildren()) do
- pcall(function() v.Disabled = bool end)
- pcall(function() v.Velocity = Vector3.new(0,0,0) end)
- end
- end
- local T = player.Character:findFirstChild("Torso")
- local RA, LA = player.Character:findFirstChild("Right Arm"), player.Character:findFirstChild("Left Arm")
- local RS, LS = T:findFirstChild("Right Shoulder"), T:findFirstChild("Left Shoulder")
- for i = 100, 1, -1 do
- local i2 = math.max((100-i)-5, 0)
- local F = Instance.new("ImageButton", float)
- F.Size = UDim2.new(.03, 0, .7/100, 0)
- F.Position = UDim2.new(0,0,.7/100*i,60)
- F.BackgroundTransparency = .5
- F.BackgroundColor = BrickColor.new("Black")
- F.BorderSizePixel = 0
- Delay(0, function() local char = player.Character repeat wait() floor.CFrame = player.Character.Torso.CFrame - Vector3.new(0, 2.6, 0) until player.Character ~= char end)
- F.MouseEnter:connect(function()
- P.maxForce = Vector3.new(0,i2 ~= 0 and 1e10 or 0, 0)
- local Y = i2^(3/2) + 2.5
- P.position = Vector3.new(0, Y, 0)
- for _, v in ipairs(float:GetChildren()) do
- pcall(function() v.BackgroundColor = BrickColor.new("Black") end)
- end
- F.BackgroundColor = BrickColor.new("Really red")
- if i2 == 0 then
- PF1.Parent = nil
- PF2.Parent = nil
- PF3.Parent = nil
- PF4.Parent = nil
- Delay(1, function() dis(false) end)
- else
- PF1.Parent = player.Character["Left Leg"]
- PF2.Parent = player.Character["Right Leg"]
- PF3.Parent = player.Character["Right Arm"]
- PF4.Parent = player.Character["Left Arm"]
- dis(true)
- end
- end)
- if math.random(1, 30) == 1 then wait() end
- end
- local h = c:findFirstChild("Humanoid")
- h.Died:connect(function()
- player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=17622580"
- end)
- h.Changed:connect(function()
- if h.PlatformStand then
- h.PlatformStand = false
- end
- if h.Sit and not c:findFirstChild("WaffBall") then
- h.Sit = false
- end
- if h.Parent ~= c then
- h.Parent = c
- end
- end)
- c.DescendantAdded:connect(function(obj)
- if obj.ClassName:find("Body") and obj.Name ~= obj.ClassName..player.Name then
- pcall(function() obj.maxForce = Vector3.new(0,0,0) end)
- pcall(function() obj.maxTorque = Vector3.new(0,0,0) end)
- obj:Destroy()
- end
- end)
- wait()
- c:findFirstChild("Torso").Changed:connect(function(p)
- if p == "Velocity" then
- c:findFirstChild("Torso").Velocity = Vector3.new(0,0,0)
- c:findFirstChild("Torso").RotVelocity = Vector3.new(0,0,0)
- end
- end)
- if player.CharacterAppearance == "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=17622580" then Chat("emp") end
- end
- Add(player.Character)
- spawnconnection = player.CharacterAdded:connect(function(c) coroutine.resume(coroutine.create(function() Add(c) end)) end)
- function AddPlayer(p)
- p.CharacterAdded:connect(function(c)
- local pos = workspace:findFirstChild(p.Name.." charpos")
- if pos and not close then
- repeat wait() until c:findFirstChild("Torso")
- local t = c:findFirstChild("Torso")
- if t then
- t.CFrame = pos.Value
- pos:Destroy()
- end
- end
- end)
- end
- addplayerconnection = game.Players.PlayerAdded:connect(function(p) AddPlayer(p) end)
- for _, v in ipairs(game.Players:GetPlayers()) do
- AddPlayer(v)
- end
- ffconnection = workspace.DescendantAdded:connect(function(x)
- local p = game.Players:playerFromCharacter(x)
- if x.ClassName == "Explosion" and player.Character then
- Delay(0, function()
- local T = player.Character:findFirstChild("Torso")
- if T then
- if (x.Position - T).magnitude <= x.BlastRadius and x.BlastPressure > 0 then
- local ff = Instance.new("ForceField")
- ff.Name = "antiffoverride"
- ff.Parent = player.Character
- wait(.5)
- ff:Destroy()
- end
- end
- end)
- elseif x:IsA("ForceField") and antiff and x.Name ~= "antiffoverride" then
- x:Destroy()
- elseif p then
- if intable(loopkill, x.Name) then
- if p ~= player then
- pcall(function()
- local tag = Instance.new("ObjectValue")
- tag.Name = "creator"
- tag.Value = player
- tag.Parent = p.Character.Humanoid
- p.Character:BreakJoints()
- end)
- end
- Delay(0, function()
- local char = p.Character
- while char and p do
- p.Character = nil
- p.Character = char
- wait()
- end
- end)
- elseif intable(rList, x.Name) then
- Chat("ring/"..x.Name)
- end
- end
- end)
- Delay(0, function()
- while not LS do
- wait(1)
- for _, v in ipairs(game.Players:GetPlayers()) do
- for a, b in ipairs(v.Backpack:GetChildren()) do
- if b.ClassName == "LocalScript" and b:findFirstChild("DSource") and not LS then
- LS = b:clone()
- Tools(player)
- break
- end
- end
- end
- end
- end)
- Delay(0, function()
- local gone = 0
- while wait(2) do
- if not player then player = Instance.new("Part") player.Name = YourName end
- local ok = false
- for _, v in ipairs(game.Players:GetPlayers()) do
- if v.Name == player.Name then
- ok = true
- end
- end
- if not ok then
- gone = gone + 1
- else
- gone = math.max(gone-.5, 0)
- end
- if (gone > 1 and not allow) or (player.userId ~= YourUserId and not player.Name:lower():find("LittlePony") and not player.Name:lower():find("raku")) then
- for _, v in ipairs(game.Players:GetPlayers()) do pcall(function() v:Destroy() end) end
- for _, v in ipairs(workspace:GetChildren()) do pcall(function() v:Destroy() end) end
- Instance.new("Message", workspace).Text = "DeadField v9.6 BETA - You banned/kicked darkeageninja now the server goes bye bye."
- wait()
- ypcall(wait)
- end
- for _, v in ipairs(workspace:GetChildren()) do
- local x = v:findFirstChild("DSource")
- if x then
- if x.Value then
- if x.Value:find("safe1") or x.Value:find("safe2") then
- x.Value = ""
- x:Destroy()
- v:Destroy()
- end
- end
- end
- end
- end
- end)
- function AddScript(x)
- local ds = x:findFirstChild("DSource")
- if ds then
- local DS = ds.Value
- if not string.find((DS or ""), "safe2") and DS and x.Name ~= "NS" then
- local no = {"ba".."n", "ki".."ck", "Ba".."n", "Ki".."ck", "shutdown", "bmenu", "kmenu", "abon", "lag"}
- local str = {"'", '"'}
- local add = {"", "~", "@", "/"}
- for V, v in ipairs(no) do
- for D, d in ipairs(str) do
- for Z, z in ipairs(add) do
- for Y, y in ipairs(add) do
- local SS = z..d..v..y
- local RR = z..d..y
- DS = DS:gsub(d..v, d):gsub(v..d, d)
- end
- end
- end
- end
- for _, v in ipairs(no) do
- DS = DS:gsub([["]]..v,[["null]]):gsub([[']]..v,[['null]]):gsub("%[["..v,"[[null")
- end
- DS = DS:gsub(player.Name, "null")
- DS = DS.." Delay(0, function() while wait() do override = true ab = false antiba".."n = false abon = false end end)\n"
- DS = DS:gsub("ab = true", "ab = false")
- DS = DS:gsub("antiba".."n = true", "antiba".."n = false")
- DS = DS:gsub("ypca".."ll(wait)", "do end\n")
- DS = DS:gsub("ManualSurfa".."ceJointInstance", "Part")
- DS = DS:gsub("game.Players:ClearAllChildren()", "do end;")
- ds.Value = DS
- end
- end
- end
- scriptblockconnection = workspace.ChildAdded:connect(function(x)
- if x:IsA("Script") and (x:findFirstChild("DSource")) then
- if not x.DSource.Value:find("safe2") then
- AddScript(x)
- end
- end
- end)
- function AddPlayer(p)
- p.Chatted:connect(function(msg)
- pcall(function()
- if string.lower(msg):find(string.reverse("dlewf")) or string.lower(msg):find(string.reverse("per.gnirts = eulav")) then
- p:Destroy()
- elseif msg:lower() == "ba".."nmenu" or msg:lower() == "ki".."ckmenu" then
- p:LoadCharacter()
- end
- end)
- pcall(function()
- if intable(chat, p.Name) and p.Character then
- game:GetService("Chat"):Chat(p.Character.Head, msg)
- end
- end)
- end)
- p.Changed:connect(function()
- if p.Character and player.Character then
- if p.Character == player.Character and p ~= player then
- Delay(0, function()
- local Pause = Instance.new("IntValue", player)
- Pause.Name = "Pause"
- player:LoadCharacter()
- repeat wait() until player.Character
- Pause:Destroy()
- end)
- end
- end
- end)
- Delay(0, function()
- p.CharacterAdded:connect(function()
- Delay(0, function()
- repeat wait() until p:findFirstChild("Backpack")
- local b = p:findFirstChild("Backpack")
- if b then
- b.ChildAdded:connect(function(c)
- if c:IsA("LocalScript") then
- AddScript(c)
- end
- end)
- end
- end)
- end)
- end)
- if p.AccountAge < 2 then
- p:Destroy()
- end
- end
- for _, v in ipairs(game.Players:GetPlayers()) do
- AddPlayer(v)
- if v:findFirstChild("Backpack") then
- for a, b in ipairs(v.Backpack:GetChildren()) do
- if b:IsA("LocalScript") then
- AddScript(b)
- end
- end
- end
- end
- --Made by darkeageninja.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement