Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- ------------------------------------
- -- Minigame-Scripts by basbas1234 --
- ------------------------------------
- --------------------------------------
- -- --
- -- Varibles&Settings; --
- -- --
- --------------------------------------
- local Player = game.Players.LocalPlayer
- local Char = Player.Character
- local Head = Char["Head"]
- local Torso = Char["Torso"]
- local HumanoidRootPart = Char["HumanoidRootPart"]
- local RightArm = Char["Right Arm"]
- local LeftArm = Char["Left Arm"]
- local RightLeg = Char["Right Leg"]
- local LeftLeg = Char["Left Leg"]
- local Humanoid = Char["Humanoid"]
- local RootJoint = HumanoidRootPart["RootJoint"]
- local LS = Torso["Left Shoulder"]
- local RS = Torso["Right Shoulder"]
- local Neck = Torso["Neck"]
- local necko = CFrame.new(0, 1.5, 0)
- local ServerStorage = game:GetService("ServerStorage")
- local Loop = game:GetService("RunService").RenderStepped
- local rs = Loop
- local Camera = game.Workspace.CurrentCamera
- local PlayerGui = Player.PlayerGui
- local Backpack = Player.Backpack
- local Mouse = Player:GetMouse()
- local cf = CFrame.new
- local euler = CFrame.fromEulerAnglesXYZ
- local angles = CFrame.Angles
- local RootCF = euler(-1.57,0,3.14)
- local stanceToggle = "Normal"
- local CoreEvents = nil
- local idSounds = {
- 367453005, --Teleport Sound-Effect [id:1]
- 930465002, --Infinite Music [id:2]
- 110284742, --Robot-Language Music [id:3]
- 677036127, --Fresh Sans Music [id:4]
- 133680244, --Explode Sound-EFfect [id:5]
- 1208650519, --Chaos Sound-Effect [id:6]
- 1838666596 --Cyber Music [id:7]
- }
- local ListEvents = Instance.new("Folder",Player)
- ListEvents.Name = "NameEvents"
- local makeliste = {}
- spawn(function()
- for i in pairs(Events) do
- table.insert(makeliste, i)
- end
- end)
- spawn(function()
- for i = 1, #makeliste do
- local bv = Instance.new("BoolValue",ListEvents)
- bv.Name = makeliste[i]
- end
- end)
- local Survivalist = {}
- local mesh = {}
- local Effects = {}
- --------------------------------------
- -- --
- -- Main&Function; --
- -- --
- --------------------------------------
- -- Load_LeaderStats --
- local TotalMoney,TotalSurvival = nil,nil or 0,0
- function NewLeaderStats()
- local plr = game.Players:GetChildren()
- for i = 1, #plr do
- local s,s2 = plr[i]:findFirstChild("leaderstats"),plr[i]:findFirstChildOfClass("IntValue")
- if (s == nil) and (s2 == nil) then
- local stats = Instance.new("IntValue")
- stats.Name = "leaderstats"
- local cash = Instance.new("IntValue")
- cash.Name = "Cash"
- cash.Value = 0
- cash.Parent = stats
- TotalMoney = cash
- local survive = Instance.new("IntValue")
- survive.Name = "Survival"
- survive.Value = 0
- survive.Parent = stats
- TotalSurvival = survive
- stats.Parent = plr[i]
- end
- end
- end
- -- Load_NewSpawnLocation --
- function NewSpawnLocation()
- local plr = game.Players:GetChildren()
- for i = 1, #plr do
- local s,s2 = plr[i].Character:findFirstChild("Spawned"),plr[i].Character:findFirstChildOfClass("BindableEvent")
- if (s == nil) and (s2 == nil) then
- local stats = Instance.new("BindableEvent")
- stats.Name = "Spawned"
- stats.Parent = plr[i].Character
- --Teleport to New
- spawn(function()
- plr[i].Character:MoveTo(CoreEvents.Position + Vector3.new(math.random(-80,80),0,math.random(-80,80)))
- end)
- end
- end
- end
- -- Survive_System --
- function Check_Survive()
- coroutine.resume(coroutine.create(function()
- local plr = game.Players:GetChildren()
- for i = 1, #plr do
- spawn(function()
- local CheckSurvive = Instance.new("Motor6D",plr[i].Character)
- CheckSurvive.Name = "IsSurvive"
- CheckSurvive.Part0 = plr[i].Character.Torso
- CheckSurvive.Part1 = plr[i].Character.HumanoidRootPart
- end)
- end
- end))
- end
- function Reset_Survive()
- coroutine.resume(coroutine.create(function()
- local plr = game.Players:GetChildren()
- local CashStats = math.random(150,300)
- for i = 1, #plr do
- local Stats = plr[i]:FindFirstChild("leaderstats")
- local GetCash = Stats:FindFirstChild("Cash")
- local GetSurvival = Stats:FindFirstChild("Survival")
- local IsSurvive = plr[i].Character:FindFirstChild("IsSurvive")
- if IsSurvive ~= nil then
- GetCash.Value = GetCash.Value + CashStats
- GetSurvival.Value = GetSurvival.Value + 1
- IsSurvive:Destroy()
- table.insert(Survivalist, plr[i].Name)
- end
- end
- end))
- end
- -- Camera_System --
- function CameraEnshaking(Length,Intensity,Targets)
- coroutine.resume(coroutine.create(function()
- local plr = game.Players:GetChildren()
- if Targets == 'all' then
- coroutine.resume(coroutine.create(function()
- while rs:wait() do
- for i=1,#plr do
- Targets = plr[i].Character.Humanoid
- end
- end
- end))
- end
- local intensity = 1*Intensity
- local rotM = 0.01*Intensity
- for i = 0, Length, 0.1 do
- swait()
- intensity = intensity - 0.05*Intensity/Length
- rotM = rotM - 0.0005*Intensity/Length
- Humanoid.CameraOffset = Vector3.new(math.rad(math.random(-intensity, intensity)), math.rad(math.random(-intensity, intensity)), math.rad(math.random(-intensity, intensity)))
- Camera.CFrame = Camera.CFrame * cf(math.rad(math.random(-intensity, intensity)), math.rad(math.random(-intensity, intensity)), math.rad(math.random(-intensity, intensity))) * euler(math.rad(math.random(-intensity, intensity)) * rotM, math.rad(math.random(-intensity, intensity)) * rotM, math.rad(math.random(-intensity, intensity)) * rotM)
- end
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- end))
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- function Message(text,timeremove)
- local getplr = game:GetService("Players"):GetPlayers()
- for i = 1, #getplr do
- --Make Local
- coroutine.resume(coroutine.create(function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- --Msg
- local Screen = Instance.new("ScreenGui",getplr[i].PlayerGui)
- Screen.Name = "Message"
- local Msg = Instance.new("Frame",Screen)
- Msg.Name = "Main"
- Msg.Size = UDim2.new(1, 0, 1, 0)
- Msg.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- local MsgText = Instance.new("TextLabel",Msg)
- MsgText.BackgroundTransparency = 1
- MsgText.Size = UDim2.new(0.75, 0, 0.25, 0)
- MsgText.Position = UDim2.new(0.125, 0, 0.4, 0)
- MsgText.TextColor3 = Color3.fromRGB(255,255,255)
- MsgText.Name = "Output"
- MsgText.Font = Enum.Font.Cartoon
- MsgText.FontSize = Enum.FontSize.Size48
- MsgText.TextScaled = false
- MsgText.Text = ""
- --Fade In
- for i = 0, 1, .05 do
- local trans,trans2 = lerp(1,0.5,i),lerp(1,0.1,i)
- MsgText.TextTransparency = trans2
- Msg.BackgroundTransparency = trans
- rs:wait()
- end
- --Writing Animation
- local TypingSub = 0
- for i = 1 , #text do
- if TypingSub < #text then
- TypingSub = TypingSub + 1
- MsgText.Text = MsgText.Text ..text:sub(TypingSub, TypingSub)
- local nl = MsgText.Text:find("\n")
- if nl and #MsgText.Text > 400 then
- MsgText.Text = MsgText.Text:sub(nl + 1)
- end
- else
- TypingSub = 1
- end
- wait(math.random(0.05,0.3))
- end
- --Fade Out
- wait(timeremove)
- for i = 0, 1, .05 do
- local trans,trans2 = lerp(0.5,1,i),lerp(0.5,1,i)
- MsgText.TextTransparency = trans2
- Msg.BackgroundTransparency = trans
- rs:wait()
- end
- Screen:Destroy()
- end))
- end
- end
- function nooutline(part)
- part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
- end
- function weld(parent,part0,part1,c0)
- local weld = Instance.new("Weld")
- weld.Parent = parent
- weld.Part0 = part0
- weld.Part1 = part1
- weld.C0 = c0
- return weld
- end
- function mesh(Mesh,parent,meshtype,meshid,offset,scale)
- local mesh = Instance.new(Mesh)
- mesh.Parent = parent
- if Mesh=="SpecialMesh" then
- mesh.MeshType = meshtype
- mesh.MeshId = meshid
- end
- mesh.Offset=offset
- mesh.Scale=scale
- return mesh
- end
- function new(parent,reflectance,transparency,anchored,cancollide,brickcolor,name,size,extra)
- local instance = Instance.new("Part")
- instance.Parent = parent
- instance.Reflectance = reflectance
- instance.Transparency = transparency
- instance.Anchored = anchored
- instance.CanCollide = cancollide
- instance.Locked = true
- instance.Color = brickcolor
- instance.Name = name
- instance.Size = size
- if extra == "Collided" then
- instance.CanCollide = false
- end
- if extra == "Torso" then
- instance.Position = Torso.Position
- end
- nooutline(instance)
- if instance.Transparency > 0 then
- instance.Transparency = transparency
- end
- return instance
- end
- function Sound(id,name,volume,looped,parent,playing,pitch,destoryafterplayed)
- local S = Instance.new("Sound")
- S.SoundId = "rbxassetid://" ..id
- S.Name = name
- S.Volume = volume
- S.Looped = looped
- S.Parent = parent
- S.Playing = playing
- S.Pitch = pitch
- if destoryafterplayed == true then
- spawn(function()
- Loop:connect(function()
- if S.IsPlaying == false then
- S.Parent = nil
- end
- end)
- end)
- end
- return Sound
- end
- -- Gui_System; --
- local actived,debouce_execute = {false,false},{false}
- local GuiGameChooser = function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local ScreenGui = PlayerGui:FindFirstChild("GameChooser")
- if ScreenGui == nil then
- ScreenGui = Instance.new("ScreenGui",PlayerGui)
- debouce_execute[1] = false
- actived[1] = false
- end
- ScreenGui.Name = "GameChooser"
- local Main = ScreenGui:FindFirstChild("Main") or Instance.new("Frame",ScreenGui)
- Main.Name = "Main"
- Main.Position = UDim2.new(0,0, 0,0)
- Main.BackgroundColor3 = Color3.fromRGB(0, 162, 245)
- Main.BackgroundTransparency = 0.3
- Main.BorderSizePixel = 0
- Main.Active = true
- Main.Selectable = false
- Main.Draggable = true
- local CloseButton = Main:FindFirstChild("Close") or Instance.new("TextButton",Main)
- CloseButton.Name = "Close"
- CloseButton.BackgroundColor3 = Color3.fromRGB(255,0,0)
- CloseButton.BackgroundTransparency = 0
- CloseButton.BorderColor3 = Color3.fromRGB(0,0,0)
- CloseButton.BorderSizePixel = 0
- CloseButton.TextColor3 = Color3.fromRGB(255,255,255)
- CloseButton.TextTransparency = 0
- CloseButton.TextStrokeTransparency = 0
- CloseButton.Text = "X"
- CloseButton.TextScaled = true
- CloseButton.TextSize = 16
- CloseButton.Font = Enum.Font.ArialBold
- CloseButton.Position = UDim2.new(0.9175,0,0,0)
- CloseButton.Size = UDim2.new(0.0825,0,0.105,0)
- CloseButton.TextXAlignment = "Center"
- CloseButton.TextYAlignment = "Center"
- local EventsBox = Main:FindFirstChild("Input/Show Events") or Instance.new("TextBox",Main)
- EventsBox.Name = "Input/Show Events"
- EventsBox.BackgroundColor3 = Color3.fromRGB(155,155,155)
- EventsBox.BackgroundTransparency = 0.7
- EventsBox.BorderColor3 = Color3.fromRGB(0,255,0)
- EventsBox.BorderSizePixel = 1
- EventsBox.TextColor3 = Color3.fromRGB(255,255,255)
- EventsBox.TextTransparency = 0
- EventsBox.TextStrokeTransparency = 0
- EventsBox.Text = "Meteor"
- EventsBox.TextScaled = true
- EventsBox.TextSize = 0
- EventsBox.Font = Enum.Font.SciFi
- EventsBox.Position = UDim2.new(0.405,0,0.175,0)
- EventsBox.Size = UDim2.new(0.215,0,0.125,0)
- EventsBox.TextXAlignment = "Center"
- EventsBox.TextYAlignment = "Center"
- local RepeatBox = Main:FindFirstChild("Repeat Box") or Instance.new("TextBox",Main)
- RepeatBox.Name = "Repeat Box"
- RepeatBox.BackgroundColor3 = Color3.fromRGB(0,0,155)
- RepeatBox.BackgroundTransparency = 0.7
- RepeatBox.BorderColor3 = Color3.fromRGB(0,255,0)
- RepeatBox.BorderSizePixel = 1
- RepeatBox.TextColor3 = Color3.fromRGB(255,255,255)
- RepeatBox.TextTransparency = 0
- RepeatBox.TextStrokeTransparency = 0
- RepeatBox.Text = "1"
- RepeatBox.TextScaled = true
- RepeatBox.TextSize = 0
- RepeatBox.Font = Enum.Font.SciFi
- RepeatBox.Position = UDim2.new(0.135,0,0.605,0)
- RepeatBox.Size = UDim2.new(0.185,0,0.145,0)
- RepeatBox.TextXAlignment = "Center"
- RepeatBox.TextYAlignment = "Center"
- local BetweenBox = Main:FindFirstChild("BetweenTimes Box") or Instance.new("TextBox",Main)
- BetweenBox.Name = "BetweenTimes Box"
- BetweenBox.BackgroundColor3 = Color3.fromRGB(255,255,255)
- BetweenBox.BackgroundTransparency = 0.7
- BetweenBox.BorderColor3 = Color3.fromRGB(0,255,0)
- BetweenBox.BorderSizePixel = 1
- BetweenBox.TextColor3 = Color3.fromRGB(255,255,255)
- BetweenBox.TextTransparency = 0
- BetweenBox.TextStrokeTransparency = 0
- BetweenBox.Text = "5"
- BetweenBox.TextScaled = true
- BetweenBox.TextSize = 0
- BetweenBox.Font = Enum.Font.SciFi
- BetweenBox.Position = UDim2.new(0.425,0,0.605,0)
- BetweenBox.Size = UDim2.new(0.185,0,0.145,0)
- BetweenBox.TextXAlignment = "Center"
- BetweenBox.TextYAlignment = "Center"
- local DestroyTimesBox = Main:FindFirstChild("DestroyTimes Box") or Instance.new("TextBox",Main)
- DestroyTimesBox.Name = "DestroyTimes Box"
- DestroyTimesBox.BackgroundColor3 = Color3.fromRGB(255,255,255)
- DestroyTimesBox.BackgroundTransparency = 0.7
- DestroyTimesBox.BorderColor3 = Color3.fromRGB(0,255,0)
- DestroyTimesBox.BorderSizePixel = 1
- DestroyTimesBox.TextColor3 = Color3.fromRGB(255,255,255)
- DestroyTimesBox.TextTransparency = 0
- DestroyTimesBox.TextStrokeTransparency = 0
- DestroyTimesBox.Text = "5"
- DestroyTimesBox.TextScaled = true
- DestroyTimesBox.TextSize = 0
- DestroyTimesBox.Font = Enum.Font.SciFi
- DestroyTimesBox.Position = UDim2.new(0.715,0,0.605,0)
- DestroyTimesBox.Size = UDim2.new(0.185,0,0.145,0)
- DestroyTimesBox.TextXAlignment = "Center"
- DestroyTimesBox.TextYAlignment = "Center"
- local ExecuteEventsBox = Main:FindFirstChild("ExecuteBox") or Instance.new("TextButton",Main)
- ExecuteEventsBox.Name = "ExecuteBox"
- ExecuteEventsBox.BackgroundColor3 = Color3.fromRGB(0,255,0)
- ExecuteEventsBox.BackgroundTransparency = 0.3
- ExecuteEventsBox.BorderColor3 = Color3.fromRGB(0,0,0)
- ExecuteEventsBox.BorderSizePixel = 0
- ExecuteEventsBox.TextColor3 = Color3.fromRGB(255,255,255)
- ExecuteEventsBox.TextTransparency = 0.1
- ExecuteEventsBox.TextStrokeTransparency = 0
- ExecuteEventsBox.Text = "Execute"
- ExecuteEventsBox.TextScaled = false
- ExecuteEventsBox.TextSize = 28
- ExecuteEventsBox.Font = Enum.Font.Cartoon
- ExecuteEventsBox.Position = UDim2.new(0.425,0,0.8,0)
- ExecuteEventsBox.Size = UDim2.new(0.185,0,0.15,0)
- ExecuteEventsBox.TextXAlignment = "Center"
- ExecuteEventsBox.TextYAlignment = "Center"
- local i = 1
- local Title = {Main:FindFirstChild("Title1") or Instance.new("TextLabel",Main), Main:FindFirstChild("Title2") or Instance.new("TextLabel",Main), Main:FindFirstChild("Title3") or Instance.new("TextLabel",Main), Main:FindFirstChild("Title4") or Instance.new("TextLabel",Main)}
- Title[i].Name = "Title1"
- Title[i].BackgroundColor3 = Color3.fromRGB(0,0,0)
- Title[i].BackgroundTransparency = 1
- Title[i].BorderColor3 = Color3.fromRGB(0,0,0)
- Title[i].BorderSizePixel = 0
- Title[i].TextColor3 = Color3.fromRGB(255,255,255)
- Title[i].TextTransparency = 0.1
- Title[i].TextStrokeTransparency = 0
- Title[i].Text = "DestroyTimes"
- Title[i].TextScaled = false
- Title[i].TextSize = 28
- Title[i].Font = Enum.Font.Cartoon
- Title[i].Position = UDim2.new(0.715,0,0.605-0.2,0)
- Title[i].Size = UDim2.new(0.185,0,0.145,0)
- Title[i].TextXAlignment = "Center"
- Title[i].TextYAlignment = "Center"
- i = 2
- Title[i].Name = "Title2"
- Title[i].BackgroundColor3 = Color3.fromRGB(0,0,0)
- Title[i].BackgroundTransparency = 1
- Title[i].BorderColor3 = Color3.fromRGB(0,0,0)
- Title[i].BorderSizePixel = 0
- Title[i].TextColor3 = Color3.fromRGB(255,255,255)
- Title[i].TextTransparency = 0.1
- Title[i].TextStrokeTransparency = 0
- Title[i].Text = "BewteenTimes"
- Title[i].TextScaled = false
- Title[i].TextSize = 28
- Title[i].Font = Enum.Font.Cartoon
- Title[i].Position = UDim2.new(0.425,0,0.605-0.2,0)
- Title[i].Size = UDim2.new(0.185,0,0.145,0)
- Title[i].TextXAlignment = "Center"
- Title[i].TextYAlignment = "Center"
- i = 3
- Title[i].Name = "Title3"
- Title[i].BackgroundColor3 = Color3.fromRGB(0,0,0)
- Title[i].BackgroundTransparency = 1
- Title[i].BorderColor3 = Color3.fromRGB(0,0,0)
- Title[i].BorderSizePixel = 0
- Title[i].TextColor3 = Color3.fromRGB(255,255,255)
- Title[i].TextTransparency = 0.1
- Title[i].TextStrokeTransparency = 0
- Title[i].Text = "RepeatTimes"
- Title[i].TextScaled = false
- Title[i].TextSize = 28
- Title[i].Font = Enum.Font.Cartoon
- Title[i].Position = UDim2.new(0.135,0,0.605-0.2,0)
- Title[i].Size = UDim2.new(0.185,0,0.145,0)
- Title[i].TextXAlignment = "Center"
- Title[i].TextYAlignment = "Center"
- i = 4
- Title[i].Name = "Title4"
- Title[i].BackgroundColor3 = Color3.fromRGB(0,0,0)
- Title[i].BackgroundTransparency = 1
- Title[i].BorderColor3 = Color3.fromRGB(0,0,0)
- Title[i].BorderSizePixel = 0
- Title[i].TextColor3 = Color3.fromRGB(255,255,255)
- Title[i].TextTransparency = 0.1
- Title[i].TextStrokeTransparency = 0
- Title[i].Text = "NameEvents"
- Title[i].TextScaled = false
- Title[i].TextSize = 30
- Title[i].Font = Enum.Font.Cartoon
- Title[i].Position = UDim2.new(0.405,0,0.2-0.2,0)
- Title[i].Size = UDim2.new(0.215,0,0.125,0)
- Title[i].TextXAlignment = "Center"
- Title[i].TextYAlignment = "Center"
- local repeatvalue, bewteenvalue, destroytimes = Instance.new("NumberValue",RepeatBox), Instance.new("NumberValue",BetweenBox), Instance.new("NumberValue",DestroyTimesBox)
- --search event system
- local ItemFrame = Instance.new("ScrollingFrame")
- ItemFrame.Name = "ItemFrame"
- ItemFrame.Parent = EventsBox
- ItemFrame.BackgroundColor3 = Color3.new(0.317647, 0.317647, 0.317647)
- ItemFrame.BorderSizePixel = 0
- ItemFrame.Position = UDim2.new(0,0,1,0)
- ItemFrame.BackgroundTransparency = 1
- ItemFrame.Size = UDim2.new(1,0,1,0)
- ItemFrame.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
- ItemFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- ItemFrame.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
- local path = ListEvents
- local items = ItemFrame
- local function search(text)
- local items = {}
- for i, v in next, path:GetChildren() do
- if text:upper() == v.Name:sub(1, string.len(text)):upper() then
- table.insert(items, v.Name)
- end
- end
- return items
- end
- local function bind(thing, f)
- thing.MouseButton1Click:connect(function()
- f()
- end)
- end
- EventsBox.Changed:connect(function()
- local list = search(EventsBox.Text)
- if EventsBox.Text:gsub("", "") == "" then
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- items:ClearAllChildren()
- return
- end
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- items:ClearAllChildren()
- for i, v in next, list do
- local yPos = ((20 * i) - 20)
- local s = Instance.new('TextButton', items)
- s.BorderSizePixel = 0
- s.Font = Enum.Font.ArialBold
- s.TextScaled = true
- s.Text = v
- s.Name = v
- s.BackgroundColor3 = Color3.fromRGB(211, 211, 211)
- s.TextColor3 = Color3.new(0, 0, 0)
- s.Size = UDim2.new(1, 0, 0.5, 0)
- s.Position = UDim2.new(0, 0, 0, yPos)
- bind(s, function()
- EventsBox.Text = s.Text
- items:ClearAllChildren()
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- s:Destroy()
- end)
- if EventsBox.Text == s.Text then
- items.CanvasSize = UDim2.new(0, 0, 0, 0)
- items:ClearAllChildren()
- end
- end
- items.CanvasSize = UDim2.new(0, 0, 0, (20 * #list))
- end)
- --fade in
- for i = 0, 1, .025 do
- Main.Visible = true
- local ns = lerp(0.00125,0.5,i)
- Main.Size = UDim2.new(ns+ns*0.2,0, ns+ns*0.1,0)
- rs:wait()
- end
- --fade out
- CloseButton.MouseButton1Click:connect(function()
- for i = 0, 1, .025 do
- local ns = lerp(0.5,0.00125,i)
- Main.Size = UDim2.new(ns+ns*0.2,0, ns+ns*0.1,0)
- rs:wait()
- end
- Main.Visible = false
- end)
- --make event
- if actived[1] == false then
- actived[1] = true
- ExecuteEventsBox.MouseButton1Click:connect(function()
- spawn(function()
- repeatvalue,bewteenvalue,destroytimes = RepeatBox.Text,BetweenBox.Text,DestroyTimesBox.Text
- local Fixed_Event = EventsBox.Text
- Message("Disaster : " ..Fixed_Event .." are coming!",2)
- wait(2)
- Check_Survive()
- for i = 1, repeatvalue do
- Events[Fixed_Event].Create(destroytimes)
- wait(bewteenvalue)
- end
- Reset_Survive()
- Message("Survive : " ..table.concat(Survivalist, ' '))
- spawn(function()
- for i = 1, #Survivalist do
- table.remove(Survivalist, i)
- end
- end)
- end)
- end)
- end
- end
- local MapChooserGui = function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local Screen = PlayerGui:FindFirstChild("MapChooser")
- if Screen == nil then
- Screen = Instance.new("ScreenGui",PlayerGui)
- actived[2] = false
- end
- Screen.Name = "MapChooser"
- local Frame = Screen:FindFirstChild("Main") or Instance.new("Frame",Screen)
- Frame.Visible = true
- Frame.Name = "Main"
- Frame.Size = UDim2.new(0.5,0,0.325,0)
- Frame.BackgroundColor3 = Color3.fromRGB(175,175,175)
- Frame.BorderSizePixel = 3
- Frame.BorderColor3 = Color3.fromRGB(255,255,255)
- Frame.BackgroundTransparency = 1
- Frame.Active = true
- Frame.Selectable = false
- Frame.Draggable = true
- local ExecuteBox = Frame:FindFirstChild("Execute") or Instance.new("TextButton",Frame)
- ExecuteBox.Name = "Execute"
- ExecuteBox.Style = Enum.ButtonStyle.Custom
- ExecuteBox.Size = UDim2.new(0.25,0,0.205,0)
- ExecuteBox.Position = UDim2.new(0.4,0,0.75,0)
- ExecuteBox.BorderSizePixel = 0
- ExecuteBox.BackgroundColor3 = Color3.fromRGB(0,170,255)
- ExecuteBox.TextColor3 = Color3.fromRGB(255,255,255)
- ExecuteBox.Text = "Execute"
- ExecuteBox.TextSize = 20
- local Input = Frame:FindFirstChild("Input") or Instance.new("TextBox",Frame)
- Input.Name = "Input"
- Input.Text = ""
- Input.Size = ExecuteBox.Size + UDim2.new(0.2,0,0.1,0)
- Input.Position = ExecuteBox.Position + UDim2.new(-0.1,0,-0.425,0)
- Input.BorderSizePixel = 0
- Input.BackgroundColor3 = Color3.fromRGB(0,0,0)
- Input.BackgroundTransparency = 0.6
- Input.TextColor3 = Color3.fromRGB(255,255,255)
- Input.TextSize = 26
- Input.ShowNativeInput = true
- Input.ClearTextOnFocus = false
- Input.PlaceholderText = "MapName or ID"
- local CloseButton = Frame:FindFirstChild("Close") or Instance.new("TextButton",Frame)
- CloseButton.Name = "Close"
- CloseButton.Size = UDim2.new(0.05,0,0.125,0)
- CloseButton.Position = UDim2.new(0.95,0,0,0)
- CloseButton.BackgroundColor3 = Color3.fromRGB(255,0,0)
- CloseButton.BackgroundTransparency = 0.3
- CloseButton.Text = "X"
- CloseButton.TextScaled = true
- for i = 0 ,1 ,0.0625 do
- local cn = lerp(1,0.5,i)
- Frame.BackgroundTransparency = cn
- ExecuteBox.BackgroundTransparency = cn
- ExecuteBox.TextTransparency = cn-cn*0.9
- Input.BackgroundTransparency = cn
- Input.TextTransparency = cn-cn*0.9
- rs:wait()
- end
- if actived[2] == false then
- actived[2] = true
- ExecuteBox.MouseButton1Click:connect(function()
- if debouce_execute[1] == false then
- debouce_execute[1] = true
- local ID = Input.Text
- Map[ID].Create()
- end
- end)
- end
- CloseButton.MouseButton1Click:connect(function()
- for i = 0 ,1 ,0.0625 do
- local cn = lerp(0.5,1,i)
- Frame.BackgroundTransparency = cn
- ExecuteBox.BackgroundTransparency = cn
- ExecuteBox.TextTransparency = cn
- Input.BackgroundTransparency = cn
- Input.TextTransparency = cn
- rs:wait()
- end
- Frame.Visible = false
- end)
- --Nothing
- end
- -- End_Gui_System --
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- Check_Map-Placed Function
- ------------------------------------------------------------------------------------------------------------------------------------------------
- function float(parent)
- local part = parent:GetChildren()
- for i=1, #part do
- part[i].Velocity = Vector3.new(0,0,0)
- part[i].RotVelocity = Vector3.new(0,0,0)
- end
- end
- function anchored(parent)
- local part = parent:GetChildren()
- for i=1, #part do
- part[i].Anchored = true
- part[i].Velocity = Vector3.new(0,0,0)
- part[i].RotVelocity = Vector3.new(0,0,0)
- end
- end
- function uncomfirm(parent)
- local part = parent:GetChildren()
- for i=1, #part do
- part[i].Transparency = 0.65
- end
- end
- function comfirm(parent)
- local part = parent:GetChildren()
- for i=1, #part do
- part[i].CanCollide = true
- end
- end
- function checkconfirm(Map)
- spawn(function()
- local Click = false
- while Click == false do
- float(Map)
- Mouse.Move:connect(function()
- if Click == false then
- Map:MoveTo(Vector3.new(Mouse.Hit.X,Mouse.Target.Position.Y,Mouse.Hit.Z))
- end
- end)
- Mouse.Button1Up:connect(function()
- if Click == false then
- anchored(Map)
- comfirm(Map)
- Click = true
- end
- end)
- if Click == true then
- break
- end
- Mouse.KeyDown:connect(function(key)
- if key == 'm' and Click == false then
- Map:Destroy()
- Click = true
- end
- end)
- wait()
- end
- end)
- end
- function resetmap()
- CoreEvents.Parent:Destroy()
- end
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- Object & E-Object
- ------------------------------------------------------------------------------------------------------------------------------------------------
- local multiplier = 1
- function hurt(hit, dmg, notdamgewith)
- if hit.Parent then
- if hit.Parent.Name == "box" then print("bocks!11") hit.Parent:Destroy() end
- local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
- if hum then
- if hum.Parent.Name ~= notdamgewith then
- if dmg == "Kill" or hum.Health > 100000 then
- hit.Parent:BreakJoints()
- return true
- else
- if math.random(0, 100) == 50 then
- hum.Health = hum.Health - dmg*multiplier*2.5
- else
- hum.Health = hum.Health -dmg*multiplier
- end
- return true
- end
- end
- end
- end
- end
- local ObjFolder = Instance.new("Folder",workspace)
- ObjFolder.Name = "ObjectEvent"
- ClearObjEvent = function()
- ObjFolder:ClearAllChildren()
- end
- Events = {
- ["blackhole"] = {
- Create = function()
- local BlackHoleObj = new(ObjFolder,0,0,false,true,Color3.fromRGB(0,0,0),"BlackHole",Vector3.new(math.random(20,25),math.random(20,25),math.random(20,25)),"")
- BlackHoleObj.Shape = Enum.PartType.Ball
- BlackHoleObj.Material = Enum.Material.Neon
- BlackHoleObj.Position = CoreEvents.Position + Vector3.new(0,math.random(25,50),0)
- BlackHoleObj.Anchored = true
- coroutine.resume(coroutine.create(function()
- local hole = BlackHoleObj
- local childList = {}
- local massConstant = 5.8 -- Generally a good value
- local mass = math.random(16000,20000) * massConstant
- -- This is basically a function that finds all unanchored parts and adds them to childList.
- -- Note: This should only be run once for each object
- function checkObject(obj)
- if (obj ~= hole) and (obj.className == "Part") then
- if (obj.Anchored == false) then
- table.insert(childList, 1, obj)
- end
- elseif (obj.className == "Model") or (obj.className == "Hat") or (obj.className == "Tool") or (obj == workspace) then
- local child = obj:GetChildren()
- for x = 1, #child do
- checkObject(child[x])
- end
- obj.ChildAdded:connect(checkObject)
- end
- end
- checkObject(workspace)
- local n = 0
- while wait() do
- checkObject(workspace)
- if n < #childList then
- n = n + 1
- if n % 800 == 0 then
- wait()
- end
- else
- n = 1
- wait()
- end
- local child = childList[n]
- if (child ~= hole) and (child.className == "Part") and (child.Anchored == false) then
- local relPos = hole.Position - child.Position
- local motivator = child:FindFirstChild("BlackHole Influence")
- --Entered Horizon Event
- if relPos.magnitude * 160 * massConstant < mass then
- --child:BreakJoints()
- if (relPos.magnitude * 320 * massConstant < mass) and (child.Size.z + hole.Size.x > relPos.magnitude * 2 - 4) then
- mass = mass + child:GetMass()
- child:Remove()
- table.remove(childList, n)
- n = n - 1 -- This is the reason I need a counter of my own design
- else
- child.CanCollide = false -- I Can assume that things won't escape the black hole.
- if motivator == nil then
- motivator = Instance.new("BodyPosition")
- motivator.Parent = child
- motivator.Name = "BlackHole Influence"
- end
- motivator.position = hole.Position
- motivator.maxForce = Vector3.new(1, 1, 1) * mass * child:GetMass() / (relPos.magnitude * massConstant)
- end
- elseif motivator ~= nil then
- motivator:Remove()
- end
- end
- end
- end))
- end
- };
- ["avalanche"] = {
- Create = function(timedisappears)
- local pos = CoreEvents.Position
- local wedge1 = Instance.new("WedgePart",ObjFolder)
- wedge1.Anchored = true
- wedge1.Size = Vector3.new(197,20,50)
- wedge1.Material = Enum.Material.Sand
- wedge1.Color = Color3.fromRGB(255,255,255)
- wedge1.Position = Vector3.new(pos.X,pos.Y,pos.Z+73)
- local coversnow = new(ObjFolder,0,0,true,false,Color3.fromRGB(255,255,255),"SnowCovered",Vector3.new(250,5,200),"")
- coversnow.Material = Enum.Material.Sand
- coversnow.CFrame = CoreEvents.CFrame
- wait(2)
- for i = 1, math.random(40,60) do
- local GiantSnowBall = new(ObjFolder,0,0,false,true,Color3.fromRGB(255,255,255),"SnowBall",Vector3.new(math.random(10,17),math.random(10,17),math.random(10,17)),"")
- GiantSnowBall.Material = Enum.Material.Sand
- GiantSnowBall.Shape = Enum.PartType.Ball
- GiantSnowBall.Position = wedge1.Position + Vector3.new(math.random(-100,100),math.random(30,120),math.random(-10,10))
- GiantSnowBall.Touched:connect(function(hit)
- hurt(hit, 100, "")
- end)
- end
- wait(timedisappears)
- ClearObjEvent()
- end
- };
- ["heavysnow"] = {
- Create = function()
- local touched = false
- local randomsize = Vector3.new(math.random(1.2,5.2),math.random(1.2,5.2),math.random(1.2,5.2))
- local Snow = new(ObjFolder,0,0,false,true,Color3.fromRGB(255,255,255),"Snow",randomsize,"")
- Snow.Shape = Enum.PartType.Ball
- Snow.Material = Enum.Material.Sand
- Snow.Position = Vector3.new(CoreEvents.Position.X+math.random(-80,80),CoreEvents.Position.Y+math.random(100,120),CoreEvents.Position.Z+math.random(-80,80))
- Snow.Velocity = Vector3.new(math.random(-120,120),math.random(-25,50),math.random(-120,120))
- Snow.Touched:connect(function(hit)
- hurt(hit ,math.random(5,10), "")
- spawn(function()
- if touched == false then
- touched = true
- wait(math.random(1,3))
- local SnowThaw = new(ObjFolder,0,0,false,false,Color3.fromRGB(255,255,255),"ThawSnow",randomsize,"")
- SnowThaw.Material = Enum.Material.Sand
- SnowThaw.Position = Snow.Position
- Snow:Destroy()
- return
- end
- end)
- end)
- end
- };
- ["meteor"] = {
- Create = function()
- local huge = Vector3.new(math.huge,math.huge,math.huge)
- local p = new(ObjFolder,0,0,false,true,Color3.fromRGB(75,75,75),"Meteor",Vector3.new(math.random(4,10),math.random(3,7),math.random(4,10)),"")
- p.Size = Vector3.new(math.random(4,10),math.random(3,7),math.random(4,10))
- p.Shape = "Ball"
- p.Material = Enum.Material.Neon
- p.Position = Vector3.new(CoreEvents.Position.X+math.random(-80,80),CoreEvents.Position.Y+math.random(125,175),CoreEvents.Position.Z+math.random(-80,80))
- local pe = Instance.new("ParticleEmitter", p)
- pe.Color = ColorSequence.new(BrickColor.new("Bright red").Color)
- pe.LightEmission = 0.7
- pe.Size = NumberSequence.new(20)
- pe.Texture = "rbxassetid://243664672"
- pe.Transparency = NumberSequence.new(0.4)
- pe.Lifetime = NumberRange.new(0.2)
- pe.Rate = 500
- pe.Speed = NumberRange.new(3)
- local bv = Instance.new("BodyVelocity", p)
- bv.MaxForce = huge
- bv.Velocity = Vector3.new(math.random(-160,160),math.random(-425,-250),math.random(-160,160))
- p.Touched:connect(function(hit)
- spawn(function()
- CameraEnshaking(5,10,'all')
- local s = Sound(idSounds[3],"Crushed",0.25,false,ObjFolder,true,math.random(1.2,2),true)
- end)
- local ep = Instance.new("Explosion")
- ep.BlastRadius = math.random(15,30)
- ep.BlastPressure = 27
- ep.Position = p.Position
- ep.Parent = ObjFolder
- if hit.Name ~= "Meteor" then
- hurt(hit, math.random(30,60), "")
- end
- for i = 1, math.random(5,12) do
- local samei = math.random(15,95)
- local effect = new(ObjFolder,0,0,false,true,Color3.fromRGB(samei,samei,samei),"Rocks",Vector3.new(math.random(0.5,2),math.random(1,2),math.random(0.5,2.1)),"")
- effect.Position = p.Position
- effect.Velocity = Vector3.new(math.random(-160,160),math.random(1,75),math.random(-160,160))
- effect.Touched:connect(function(hit)
- hurt(hit, math.random(5,20), "")
- end)
- spawn(function()
- wait(math.random(5,10))
- effect:Destroy()
- end)
- end
- bv:Destroy()
- p:Destroy()
- end)
- local meshMeteor = mesh("SpecialMesh",p,"FileMesh","http://www.roblox.com/asset/?id=1290033",Vector3.new(0,0,0),Vector3.new(math.random(5,7),math.random(4,7),math.random(5,7)))
- nooutline(p)
- end
- };
- ["flood"] = {
- Create = function(timedestroy)
- local huge = Vector3.new(math.huge,math.huge,math.huge)
- local FloodPart = new(ObjFolder,0,0,false,false,Color3.fromRGB(9,137,207),"Flood",Vector3.new(250,1,200),"")
- FloodPart.Material = "Sand"
- FloodPart.Position = Vector3.new(CoreEvents.Position.X,CoreEvents.Position.Y,CoreEvents.Position.Z)
- FloodPart.Touched:connect(function(hit)
- hurt(hit, math.random(60,100), "")
- end)
- local bv = Instance.new("BodyVelocity", FloodPart)
- bv.MaxForce = huge
- bv.Velocity = Vector3.new(0,2,0)
- local AnimeWater = Instance.new("Texture",FloodPart)
- AnimeWater.Texture = "rbxasset://textures/water/normal_21.dds"
- AnimeWater.Transparency = 0.2
- AnimeWater.StudsPerTileU = 10
- AnimeWater.StudsPerTileV = 10
- AnimeWater.Face = "Top"
- AnimeWater.Name = "WaterTexture"
- AnimeWater.Color3 = Color3.fromRGB(0,85,255)
- spawn(function()
- while true do
- for i = 1,25 do
- for _,v in pairs(FloodPart:GetChildren()) do
- if v:IsA("Texture") then
- v.Texture = string.format("rbxasset://textures/water/normal_%02d.dds",i)
- end
- end
- wait()
- end
- end
- end)
- spawn(function()
- wait(timedestroy)
- bv:Destroy()
- FloodPart:Destroy()
- end)
- end
- };
- ["killer"] = {
- Create = function()
- --Create BotKiller
- local bot = Instance.new("Model",ObjFolder)
- local rarmbot = new(bot,0,0,false,false,Color3.fromRGB(255,255,255),"Right Arm",Vector3.new(1,2,1),"Torso")
- local larmbot = new(bot,0,0,false,false,Color3.fromRGB(255,255,255),"Left Arm",Vector3.new(1,2,1),"Torso")
- local rlegbot = new(bot,0,0,false,false,Color3.fromRGB(255,255,255),"Right Leg",Vector3.new(1,2,1),"Torso")
- local llegbot = new(bot,0,0,false,false,Color3.fromRGB(255,255,255),"Left Leg",Vector3.new(1,2,1),"Torso")
- local torsobot = new(bot,0,0,false,true,Color3.fromRGB(255,255,255),"Torso",Vector3.new(2,2,1),"Torso")
- local headbot = new(bot,0,0,false,false,Color3.fromRGB(255,255,255),"Head",Vector3.new(2,1,1),"Torso")
- local humanoidbot = Instance.new("Humanoid",bot)
- humanoidbot.MaxHealth = math.huge
- humanoidbot.Health = math.huge
- humanoidbot.WalkSpeed = math.random(24,38)
- bot.Name = "Killer"
- local weldrarmbot = weld(rarmbot,rarmbot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(1.5, 0, 0))
- local weldlarmbot = weld(larmbot,larmbot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-1.5, 0, 0))
- local weldrlegbot = weld(rlegbot,rlegbot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0.5, 2, 0))
- local weldllegbot = weld(llegbot,llegbot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-0.5, 2, 0))
- local weldtorsobot = weld(torsobot,torsobot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0, 0, 0))
- local weldheadbot = weld(headbot,headbot,torsobot,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0, -1.5, 0))
- local meshheadbot = Instance.new("SpecialMesh",headbot)
- meshheadbot.Offset = Vector3.new(0,0,0)
- meshheadbot.VertexColor = Vector3.new(1,1,1)
- meshheadbot.Scale = Vector3.new(1.25,1.25,1.25)
- bot:MoveTo(Vector3.new(CoreEvents.Position.X+math.random(-50,50),CoreEvents.Position.Y+4,CoreEvents.Position.Z+math.random(-50,50)))
- --Damage BotKiller
- headbot.Touched:connect(function(hit)
- hurt(hit, math.random(2,8), "Killer")
- end)
- --Follow Function
- --local ftorsobot = torsobot
- --local h = humanoidbot
- local spawnCF = torsobot.CFrame
- spawn(function()
- local findNearestTorso = function(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 100
- local temp = nil
- local human = nil
- local temp2 = nil
- for x =1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= humanoidbot.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while wait() do
- local target = findNearestTorso(torsobot.Position)
- if target ~= nil then
- humanoidbot:MoveTo(target.Position, target)
- end
- end
- end)
- end
- };
- ["acid_rains"] = {
- Create = function()
- local acidrainparts = new(ObjFolder,0,0,false,false,Color3.fromRGB(0,math.random(200,255),0),"Rains",Vector3.new(math.random(0.5,0.6),math.random(2.5,3.5),math.random(0.5,0.6)),"")
- local sameacidscolor = acidrainparts.Color
- acidrainparts.Position = CoreEvents.Position + Vector3.new(math.random(-80,80),math.random(125,175),math.random(-80,80))
- acidrainparts.Touched:connect(function(hit)
- if hit ~= CoreEvents then
- hit.Color = sameacidscolor
- end
- hurt(hit, math.random(5,20), "")
- hit:BreakJoints()
- acidrainparts:Destroy()
- end)
- nooutline(acidrainparts)
- end
- };
- ["nuke"] = {
- Create = function()
- local debouncetouched = false
- local size = Vector3.new(2,4,2)
- local nuke = new(ObjFolder,0,0,false,false,Color3.fromRGB(0,math.random(200,255),0),"Nuke",size,"")
- nuke.Position = CoreEvents.Position + Vector3.new(math.random(-40,40),100,math.random(-40,40))
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- nuke.Touched:connect(function(hit)
- if debouncetouched ~= true then
- debouncetouched = true
- Sound(idSounds[3],"BOOM!!!",5,false,nuke,true,1,true)
- CameraEnshaking(3,5,'')
- local radioactive = new(ObjFolder,0,0,true,false,Color3.fromRGB(0,math.random(200,255),0),"RadioActive",Vector3.new(1,1,1),"")
- radioactive.Shape = Enum.PartType.Cylinder
- radioactive.Material = Enum.Material.Neon
- radioactive.Orientation = Vector3.new(0,0,90)
- radioactive.Position = nuke.Position
- radioactive.Position = Vector3.new(radioactive.Position.X,CoreEvents.Position.Y+1,radioactive.Position.Z)
- radioactive.Touched:connect(function(hit)
- hurt(hit,50,'')
- end)
- spawn(function()
- while wait(0.2) do
- spawn(function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local function rndRange(rng)
- return math.random(-rng*1000,rng*1000)/1000
- end
- local magik = Instance.new("Part", ObjFolder)
- magik.Anchored = true
- magik.Locked = true
- magik.Material = "Neon"
- magik.FormFactor = "Custom"
- magik.Size = Vector3.new(1.2, 1.2, 1.2)
- magik.TopSurface = "Smooth"
- magik.BottomSurface = "Smooth"
- magik.Transparency = 0
- magik.CanCollide = false
- magik.BrickColor = BrickColor.new(0,math.random(200,255),0)
- magik.Touched:connect(function(hit)
- hurt(hit,5,'')
- end)
- local mr = math.rad
- local rnx,rny,rnz = mr(rndRange(20)),mr(rndRange(20)),mr(rndRange(200))
- local cf = radioactive.CFrame * CFrame.new(math.random(-radioactive.Size.x,radioactive.Size.x), 1, math.random(-radioactive.Size.z,radioactive.Size.z)) * CFrame.Angles(rnx,rny,rnz)
- magik.CFrame = cf
- for i = 0, 1, .025 do
- local newTrans = lerp(0.5, 1, i)
- local ns = lerp(1,1.2,i)
- magik.Transparency = newTrans
- magik.Size = Vector3.new(ns,ns+math.random(5,7),ns)
- magik.CFrame = cf
- rs:wait()
- end
- magik:Destroy()
- end)
- end
- end)
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, 0.005 do
- local ns = lerp(0.5,0.05,i)
- radioactive.Size = radioactive.Size + Vector3.new(0,ns,ns)
- rs:wait()
- if i <= 0.5 then
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, 0.0025 do
- local ns = lerp(0,1,i)
- radioactive.Transparency = ns
- rs:wait()
- end
- radioactive:Destroy()
- end))
- end
- end
- end))
- coroutine.resume(coroutine.create(function()
- for i = 1 ,math.random(3,7) do
- local ep = Instance.new("Explosion",ObjFolder)
- ep.Position = nuke.Position + Vector3.new(math.random(-10,10),math.random(5,10),math.random(-10,10))
- end
- end))
- end
- end)
- end
- };
- ["acid_raise"] = {
- Create = function()
- end
- };
- }
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- Map Event
- ------------------------------------------------------------------------------------------------------------------------------------------------
- local Black = Color3.fromRGB(0,0,0)
- local White = Color3.fromRGB(255,255,255)
- Map = {
- ["Basic"] = {
- Create = function()
- local debounce = false
- Mouse.Button1Up:connect(function()
- if debounce == true then
- return
- end
- local MapGroup = Instance.new("Model",workspace)
- MapGroup.Name = "Map"
- --Struction
- local Core = new(MapGroup,0,0,false,true,White,"Core",Vector3.new(250,1,200),"Torso")
- CoreEvents = Core
- local Part1 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part2 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part3 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part4 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part5 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(250,2,2),"")
- local Part6 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(250,2,2),"")
- local Part7 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,2,200),"")
- local Part8 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,2,200),"")
- local Part9 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(246,75,0.5),"")
- local Part10 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(246,75,0.5),"")
- local Part11 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(0.5,75,198),"")
- local Part12 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(0.5,75,198),"")
- local Weld1 = weld(Part1,Part1,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(124,-38,99))
- local Weld2 = weld(Part2,Part2,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(124,-38,-99))
- local Weld3 = weld(Part3,Part3,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-124,-38,99))
- local Weld4 = weld(Part4,Part4,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-124,-38,-99))
- local Weld5 = weld(Part5,Part5,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-76.5,99))
- local Weld6 = weld(Part6,Part6,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-76.5,-99))
- local Weld7 = weld(Part7,Part7,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(99,-76.5,0))
- local Weld8 = weld(Part8,Part8,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-99,-76.5,0))
- local Weld9 = weld(Part9,Part9,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-38,99))
- local Weld10 = weld(Part10,Part10,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-38,-99))
- local Weld11 = weld(Part11,Part11,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(99,-38,0))
- local Weld12 = weld(Part12,Part12,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-99,-38,0))
- --Decoration
- local PartB1 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB2 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB3 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(11,1,11),"")
- local PartB4 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB5 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB6 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB7 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB8 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB9 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local WeldB1 = weld(PartB1,PartB1,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-3,0))
- local WeldB2 = weld(PartB2,PartB2,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-8,0))
- local WeldB3 = weld(PartB3,PartB3,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(55,-11,5))
- local WeldB4 = weld(PartB4,PartB4,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-3,0))
- local WeldB5 = weld(PartB5,PartB5,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-8,0))
- local WeldB6 = weld(PartB6,PartB6,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-3,10))
- local WeldB7 = weld(PartB7,PartB7,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-8,10))
- local WeldB8 = weld(PartB8,PartB8,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-3,10))
- local WeldB9 = weld(PartB9,PartB9,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-8,10))
- local PartB10 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB11 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB12 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(11,1,11),"")
- local PartB13 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB14 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB15 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local PartB16 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB17 = new(MapGroup,0,0,false,false,White,"Part",Vector3.new(1,5,1),"")
- local PartB18 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(1,5,1),"")
- local WeldB10 = weld(PartB10,PartB10,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-3,-10))
- local WeldB11 = weld(PartB11,PartB11,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-8,-10))
- local WeldB12 = weld(PartB12,PartB12,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(55,-11,-5))
- local WeldB13 = weld(PartB13,PartB13,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-14,0))
- local WeldB14 = weld(PartB14,PartB14,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-19,0))
- local WeldB15 = weld(PartB15,PartB15,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-3,-10))
- local WeldB16 = weld(PartB16,PartB16,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(60,-8,-10))
- local WeldB17 = weld(PartB17,PartB17,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-14,10))
- local WeldB18 = weld(PartB18,PartB18,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(50,-19,10))
- --Stairs
- spawn(function()
- local colorswap = Black
- local change = 0
- for i = 1 , 10 do
- local PartStair = new(MapGroup,0,0,false,false,colorswap,"Part",Vector3.new(1,1,5),"")
- local WeldStair = weld(PartStair,PartStair,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(70+change,-1+change,5))
- change = change - 1
- if colorswap == White then colorswap = Black else colorswap = White end
- end
- colorswap = White
- change = 0
- local PartBaseStair1 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(5,1,11),"")
- local WeldStair1 = weld(PartBaseStair1,PartBaseStair1,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(67,-22,-5))
- local PartBaseStair2 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(10,1,3),"")
- local WeldStair2 = weld(PartBaseStair2,PartBaseStair2,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-7.5,0,-4))
- local PartBaseStair3 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(10,1,3),"")
- local WeldStair3 = weld(PartBaseStair3,PartBaseStair3,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-7.5,0,4))
- local PartBaseStair4 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(5,1,11),"")
- local WeldStair4 = weld(PartBaseStair4,PartBaseStair4,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-15,0,0))
- for i = 1 , 10 do
- local PartStair = new(MapGroup,0,0,false,false,colorswap,"Part",Vector3.new(1,1,5),"")
- local WeldStair = weld(PartStair,PartStair,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(55+change,-12-change,-5))
- change = change + 1
- if colorswap == White then colorswap = Black else colorswap = White end
- end
- colorswap = Black
- change = 0
- PartBaseStair1 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(5,1,11),"")
- WeldStair1 = weld(PartBaseStair1,PartBaseStair1,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(67,-33,5))
- PartBaseStair2 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(10,1,3),"")
- WeldStair2 = weld(PartBaseStair2,PartBaseStair2,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-7.5,0,-4))
- PartBaseStair3 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(10,1,3),"")
- WeldStair3 = weld(PartBaseStair3,PartBaseStair3,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-7.5,0,4))
- PartBaseStair4 = new(MapGroup,0,0,false,false,colorswap,"BaseStrPart",Vector3.new(5,1,11),"")
- WeldStair4 = weld(PartBaseStair4,PartBaseStair4,PartBaseStair1,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-15,0,0))
- for i = 1 , 10 do
- local PartStair = new(MapGroup,0,0,false,false,colorswap,"Part",Vector3.new(1,1,5),"")
- local WeldStair = weld(PartStair,PartStair,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(64+change,-23+change,5))
- change = change - 1
- if colorswap == White then colorswap = Black else colorswap = White end
- end
- colorswap = White
- change = 0
- for i = 1 , 10 do
- local PartStair = new(MapGroup,0,0,false,false,colorswap,"Part",Vector3.new(1,1,5),"")
- local WeldStair = weld(PartStair,PartStair,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(55+change,-34-change,-5))
- change = change + 1
- if colorswap == White then colorswap = Black else colorswap = White end
- end
- spawn(function()
- comfirm(MapGroup)
- anchored(MapGroup)
- end)
- end)
- MapGroup:MoveTo(Vector3.new(Mouse.Hit.X,Mouse.Target.Position.Y,Mouse.Hit.Z))
- debounce = true
- debouce_execute[1] = false
- end)
- end
- };
- ["Grass"] = {
- Create = function()
- local debounce = false
- Mouse.Button1Up:connect(function()
- if debounce == true then
- return
- end
- local MapGroup = Instance.new("Model",workspace)
- MapGroup.Name = "Map"
- local Core = new(MapGroup,0,0,false,true,Color3.fromRGB(0,205,0),"Core",Vector3.new(250,1,200),"")
- Core.Material = "Grass"
- local Part1 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part2 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part3 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part4 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,75,2),"")
- local Part5 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(250,2,2),"")
- local Part6 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(250,2,2),"")
- local Part7 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,2,200),"")
- local Part8 = new(MapGroup,0,0,false,false,Black,"Part",Vector3.new(2,2,200),"")
- local Part9 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(246,75,0.5),"")
- local Part10 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(246,75,0.5),"")
- local Part11 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(0.5,75,198),"")
- local Part12 = new(MapGroup,0,0.75,false,false,Color3.fromRGB(0,0,155),"Glass",Vector3.new(0.5,75,198),"")
- local Weld1 = weld(Part1,Part1,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(124,-38,99))
- local Weld2 = weld(Part2,Part2,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(124,-38,-99))
- local Weld3 = weld(Part3,Part3,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-124,-38,99))
- local Weld4 = weld(Part4,Part4,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-124,-38,-99))
- local Weld5 = weld(Part5,Part5,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-76.5,99))
- local Weld6 = weld(Part6,Part6,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-76.5,-99))
- local Weld7 = weld(Part7,Part7,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(99,-76.5,0))
- local Weld8 = weld(Part8,Part8,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-99,-76.5,0))
- local Weld9 = weld(Part9,Part9,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-38,99))
- local Weld10 = weld(Part10,Part10,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-38,-99))
- local Weld11 = weld(Part11,Part11,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(99,-38,0))
- local Weld12 = weld(Part12,Part12,Core,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(-99,-38,0))
- spawn(function()
- anchored(MapGroup)
- comfirm(MapGroup)
- end)
- MapGroup:MoveTo(Vector3.new(Mouse.Hit.X,Mouse.Target.Position.Y,Mouse.Hit.Z))
- debounce = true
- debouce_execute[1] = false
- end)
- end
- };
- }
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- Flying Function
- ------------------------------------------------------------------------------------------------------------------------------------------------
- local rad = math.rad
- local keysDown = {}
- local flySpeed = 0
- local MAX_FLY_SPEED = 150
- local flyToggled = false
- local canFly = false
- local forward, side = 0, 0
- local lastForward, lastSide = 0, 0
- local floatBP = Instance.new("BodyPosition")
- floatBP.maxForce = Vector3.new(0, math.huge, 0)
- local flyBV = Instance.new("BodyVelocity")
- flyBV.maxForce = Vector3.new(9e9, 9e9, 9e9)
- local turnBG = Instance.new("BodyGyro")
- turnBG.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
- local function updateFly()
- if not flyToggled then return end
- lastForward = forward
- lastSide = side
- forward = 0
- side = 0
- if keysDown.w then
- forward = forward + 1
- end
- if keysDown.s then
- forward = forward - 1
- end
- if keysDown.a then
- side = side - 1
- end
- if keysDown.d then
- side = side + 1
- end
- canFly = (forward ~= 0 or side ~= 0)
- if canFly then
- stanceToggle = "Floating"
- turnBG.Parent = HumanoidRootPart
- floatBP.Parent = nil
- flyBV.Parent = HumanoidRootPart
- flySpeed = flySpeed + 1 + (flySpeed / MAX_FLY_SPEED)
- if flySpeed > MAX_FLY_SPEED then flySpeed = MAX_FLY_SPEED end
- else
- floatBP.position = Vector3.new(HumanoidRootPart.Position.X,HumanoidRootPart.Position.Y+0.01962,HumanoidRootPart.Position.Z)
- floatBP.Parent = HumanoidRootPart
- flySpeed = flySpeed - 1
- if flySpeed < 0 then flySpeed = 0 end
- end
- local camCF = Camera.CoordinateFrame
- local in_forward = canFly and forward or lastForward
- local in_side = canFly and side or lastSide
- flyBV.velocity = ((camCF.lookVector * in_forward) + (camCF * CFrame.new(in_side,
- in_forward * 0.2, 0).p) - camCF.p) * flySpeed
- turnBG.cframe = camCF * CFrame.Angles(-rad(forward * (flySpeed / MAX_FLY_SPEED)), 0,
- 0)
- end
- game:service'RunService'.RenderStepped:connect(function()
- if flyToggled then
- stanceToggle = "Floating"
- end
- updateFly()
- end)
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- OverHead-Text Function
- ------------------------------------------------------------------------------------------------------------------------------------------------
- local txt = Instance.new("BillboardGui", Char)
- txt.Adornee = Char .Head
- txt.Name = "_status"
- txt.Size = UDim2.new(2, 0, 1.2, 0)
- txt.StudsOffset = Vector3.new(-9, 7, 0)
- local otext = Instance.new("TextLabel", txt)
- otext.Size = UDim2.new(10, 0, 7, 0)
- otext.FontSize = "Size24"
- otext.TextScaled = true
- otext.TextTransparency = 0
- otext.BackgroundTransparency = 1
- otext.TextTransparency = 0
- otext.TextStrokeTransparency = 0
- otext.Font = "Code"
- otext.TextStrokeColor3 = Color3.new(0,0,0)
- otext.TextColor3 = Color3.fromRGB(255,255,255)
- otext.Text = "Creator"
- function load_overheadtext(text,color)
- otext.Text = text
- otext.TextColor3 = color
- end
- local ChangeSoundID = idSounds[4]
- local VolumeSound = 1
- local PitchSound = 1
- local RemoveSound = false
- local MainMusic = Instance.new("Sound",Head)
- MainMusic.Name = "Music"
- MainMusic.SoundId = "rbxassetid://" ..ChangeSoundID
- MainMusic.Volume = 1
- MainMusic.Playing = true
- MainMusic.TimePosition = 0
- MainMusic.PlaybackSpeed = 1
- MainMusic.Pitch = 1
- MainMusic.Looped = true
- spawn(function()
- while wait() do
- if RemoveSound == true then
- MainMusic:Destroy()
- break
- end
- MainMusic.SoundId = "rbxassetid://" ..ChangeSoundID
- MainMusic.Looped = true
- MainMusic.Pitch = PitchSound
- MainMusic.Volume = VolumeSound
- MainMusic.Parent = Head
- MainMusic:Resume()
- end
- end)
- ------------------------------------------------------------------------------------------------------------------------------------------------
- -- Decortion&Fun Function
- ------------------------------------------------------------------------------------------------------------------------------------------------
- ------------------------------------
- -- Animation; --
- ------------------------------------
- function clerp(a,b,t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1-t
- return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
- end
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5/s
- return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00-m11-m22+1)
- local recip = 0.5/s
- return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
- elseif i == 1 then
- local s = math.sqrt(m11-m22-m00+1)
- local recip = 0.5/s
- return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
- elseif i == 2 then
- local s = math.sqrt(m22-m00-m11+1)
- local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w*xs, w*ys, w*zs
- local xx = x*xs
- local xy = x*ys
- local xz = x*zs
- local yy = y*ys
- local yz = y*zs
- local zz = z*zs
- return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = t-1
- finishInterp = t
- end
- end
- return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
- end
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.Heartbeat:wait(0)
- else
- for i=0,num do
- game:service'RunService'.Heartbeat:wait(0)
- end
- end
- end
- --RS.Parent = nil
- --LS.Parent = nil
- local RW = Instance.new("Weld",Torso)
- local LW = Instance.new("Weld",Torso)
- RW.Name = "Right Shoulder"
- RW.Part0 = Torso
- RW.Part1 = RightArm
- RW.C0 = cf(1.5, 0.5, 0)
- RW.C1 = cf(0, 0.5, 0)
- LW.Name = "Left Shoulder"
- LW.Part0 = Torso
- LW.Part1 = LeftArm
- LW.C0 = cf(-1.5, 0.5, 0)
- LW.C1 = cf(0, 0.5, 0)
- local RH = Instance.new("Weld",Torso)
- local LH = Instance.new("Weld",Torso)
- local HW = Instance.new("Weld",Torso)
- local TW = Instance.new("Weld",Torso)
- RH.Name = "Right Hip"
- RH.Part0 = Torso
- RH.C0 = cf(0.5, -2, 0)
- RH.C1 = cf(0, 0, 0)
- LH.Name = "Left Hip"
- LH.Part0 = Torso
- LH.C0 = cf(-0.5, -2, 0)
- LH.C1 = cf(0, 0, 0)
- HW.Name = "Neck"
- HW.Part0 = Torso
- HW.C0 = cf(0, 1.5, 0)
- HW.C1 = cf(0, 0, 0)
- RH.Part1 = RightLeg
- LH.Part1 = LeftLeg
- HW.Part1 = Head
- local animpose = "Standing"
- local Mode = "Normal"
- local holding = false
- local change = 1
- local sine = 0
- local val = 3
- local rs_event = 1
- local max_rs_event = 2500
- Loop:connect(function()
- NewSpawnLocation()
- NewLeaderStats()
- coroutine.resume(coroutine.create(GetColorModePototype))
- swait()
- sine = sine + change
- rs_event = rs_event + math.random(1,3)
- local torvel = (HumanoidRootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local hitfloor,posfloor = rayCast(HumanoidRootPart.Position,(CFrame.new(HumanoidRootPart.Position,HumanoidRootPart.Position - Vector3.new(0,1,0))).lookVector,4,Char)
- if rs_event >= max_rs_event then
- rs_event = 0
- max_rs_event = max_rs_event + math.random(100,350)
- end
- if stanceToggle == "Floating" then
- if torvel >= 2 then
- animpose = "Flying"
- change = 2
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.5*math.cos(sine/40)) * angles(math.rad(10),math.rad(0),math.rad(0)),.2)
- HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(-12.5-5*math.cos(sine/40))), 0.2)
- RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1)
- LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1)
- end
- if torvel <= 2 then
- if rs_event >= 1800 then
- animpose = "rs_Standing"
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.25*math.cos(sine/40)) * angles(math.rad(0),math.rad(0),math.rad(0)),.2)
- HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(-70), math.rad(-70)), 0.1)
- RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1)
- LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1)
- if rs_event >= 1870 then
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.25*math.cos(sine/40)) * angles(math.rad(0),math.rad(0),math.rad(0)),.2)
- HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(-180), math.rad(-130)), 0.1)
- RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1)
- LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1)
- load_rsStand_effect()
- return rs_event
- end
- end
- animpose = "NotFlying"
- change = 2.5
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.5*math.cos(sine/40)) * angles(math.rad(0),math.rad(0),math.rad(0)),.2)
- HW.C0 = clerp(HW.C0, CFrame.new(0, 1.5, 0) * angles(math.rad(-10-4*math.cos(sine/40)),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(12.5+5*math.cos(sine/40))), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.60+0.10*math.cos(sine/40), 0) * angles(math.rad(0), math.rad(0), math.rad(-12.5-5*math.cos(sine/40))), 0.2)
- RH.C0 = clerp(RH.C0, cf(0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(5+0.5*math.cos(sine/40))),.1)
- LH.C0 = clerp(LH.C0, cf(-0.6,-2-0.05*math.cos(sine/40),0) * angles(math.rad(0),math.rad(0),math.rad(-5-0.5*math.cos(sine/40))),.1)
- end
- -- Jump
- elseif HumanoidRootPart.Velocity.y > 1 and hitfloor == nil then
- rs_event = 0
- if Mode == "Normal" then
- animpose = "Jumping"
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), 0.3)
- RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- if Mode == "Cyber" then
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(20),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(100)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-100)), 0.2)
- RH.C0 = clerp(RH.C0, cf(0.5,-1.5,-0.3) * angles(math.rad(-7-2*math.cos(sine/32)),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -1.9, 0.075) * angles(math.rad(-4-1*math.cos(sine/32)),math.rad(0),math.rad(0)),.1)
- end
- -- Fall
- elseif HumanoidRootPart.Velocity.y < -1 and hitfloor == nil then
- rs_event = 0
- if Mode == "Normal" then
- animpose = "Freefalling"
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2)
- RH.C0 = clerp(RH.C0, cf(0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -2, 0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- end
- if Mode == "Cyber" then
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(-20),math.rad(0),math.rad(0)),.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(50)), 0.2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-50)), 0.2)
- RH.C0 = clerp(RH.C0, cf(0.5,-1.5,-0.3) * angles(math.rad(-7-2*math.cos(sine/32)),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -1.9, 0.075) * angles(math.rad(-4-1*math.cos(sine/32)),math.rad(0),math.rad(0)),.1)
- end
- -- Idle
- elseif torvel < 1 and hitfloor ~=nil then
- if Mode == "Normal" then
- animpose = "Standing"
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0+1*math.cos(sine/34)),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(15 - 2.5 * math.cos(sine / 28)),math.rad(0),math.rad(0)),.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(20+5*math.cos(sine/28))), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20-5*math.cos(sine/28))), 0.1)
- RH.C0 = clerp(RH.C0, cf(0.625,-1.95,0.1) * angles(math.rad(-8+2*math.cos(sine/28)),math.rad(0),math.rad(13)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.65,-1.95,-0.1) * angles(math.rad(5-1*math.cos(sine/28)),math.rad(0),math.rad(-16)),.1)
- if rs_event >= 1800 then
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(-70), math.rad(-70)), 0.1)
- if rs_event >= 1870 then
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(-180), math.rad(-130)), 0.1)
- load_rsStand_effect()
- end
- end
- end
- if Mode == "Cyber" then
- animpose = "Standing"
- change = 2.35
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.75-0.4*math.cos(sine/32)) * angles(math.rad(0),math.rad(0),math.rad(5)),.075)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(-10),math.rad(0),math.rad(-5)),.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(70-5*math.cos(sine/32))), 0.1)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20+12*math.cos(sine/32))), 0.1)
- RH.C0 = clerp(RH.C0, cf(0.5,-1.5,-0.3) * angles(math.rad(-7-2*math.cos(sine/32)),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -1.9, 0.075) * angles(math.rad(-4-1*math.cos(sine/32)),math.rad(0),math.rad(0)),.1)
- end
- -- Walking
- elseif torvel >= 1 and hitfloor ~=nil then
- rs_event = 0
- if Mode == "Normal" then
- animpose = "Walking"
- val = torvel * 0.175
- change = val + 0.75
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0) * angles(math.rad(0+1*math.cos(sine/34)),math.rad(0),math.rad(0)),.1)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(-5),math.rad(0),math.rad(0)),.1)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko * angles(math.rad(15-2.5*math.cos(sine/28)),math.rad(0),math.rad(0)),.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10+15*math.cos(sine/28)), math.rad(0), math.rad(20+2.5*math.cos(sine/28))), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0-20*math.cos(sine/28)), math.rad(0), math.rad(-20-2.5*math.cos(sine/28))), 0.1)
- LH.C0 = clerp(LH.C0,CFrame.new(-0.5,-2+0.14*math.cos(sine/32)/2.8,-0.05+ math.sin(sine/32)/3.4) * angles(math.rad(-10) + -math.sin(sine/32)/2.3, 0, 0), .4)
- RH.C0 = clerp(RH.C0,CFrame.new(0.5,-2-0.14*math.cos(sine/32)/2.8,-0.05+ -math.sin(sine/32)/3.4) * angles(math.rad(-10) + math.sin(sine/32)/2.3, 0, 0), .4)
- --RH.C0 = clerp(RH.C0, cf(0.55, -2, 0)* angles(math.rad(-20+30*math.cos(sine/28)),math.rad(0),math.rad(3.5)),.3)
- --LH.C0 = clerp(LH.C0, cf(-0.55, -2, 0) * angles(math.rad(-20+30*math.cos(sine/28)),math.rad(0),math.rad(-3.5)),.1)
- end
- if Mode == "Cyber" then
- animpose = "Walking"
- val = torvel * 0.175
- change = val
- RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0.35) * angles(math.rad(40-5*math.cos(sine/30)),math.rad(0),math.rad(0)),.075)
- HW.C0 = clerp(HW.C0,necko * angles(math.rad(0),math.rad(0),math.rad(0)),.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(20-5*math.cos(sine/20))), 0.1)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-20-5*math.cos(sine/20))), 0.1)
- RH.C0 = clerp(RH.C0, cf(0.5,-1.5,-0.3) * angles(math.rad(-7-2*math.cos(sine/32)),math.rad(0),math.rad(0)),.3)
- LH.C0 = clerp(LH.C0, cf(-0.5, -1.9, 0.075) * angles(math.rad(-4-1*math.cos(sine/32)),math.rad(0),math.rad(0)),.1)
- end
- end
- end)
- --------------------------------------
- -- --
- -- Effect; --
- -- --
- --------------------------------------
- local SameColorMode = Color3.fromRGB(255,255,255)
- function GetColorModePototype()
- if Mode == "Normal" then
- SameColorMode = Color3.fromRGB(255,255,255)
- elseif Mode == "Cyber" then
- SameColorMode = Color3.fromRGB(0,255,255)
- end
- end
- function load_normaleffect()
- local samei
- if Mode == "Normal" then
- samei = BrickColor.White()
- end
- if Mode == "Cyber" then
- samei = BrickColor.new("Cyan")
- end
- spawn(function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local function rndRange(rng)
- return math.random(-rng*1000,rng*1000)/1000
- end
- local magik = Instance.new("Part", RightArm)
- magik.Anchored = true
- magik.Locked = true
- magik.Material = "Neon"
- magik.FormFactor = "Custom"
- magik.Size = Vector3.new(1.2, 1.2, 1.2)
- magik.TopSurface = "Smooth"
- magik.BottomSurface = "Smooth"
- magik.Transparency = 0
- magik.CanCollide = false
- magik.BrickColor = samei
- local mr = math.rad
- local rnx,rny,rnz = mr(rndRange(180)),mr(rndRange(180)),mr(rndRange(180))
- local cf = RightArm.CFrame * CFrame.new(0, -.8, 0) * CFrame.Angles(rnx,rny,rnz)
- magik.CFrame = cf
- for i = 0, 1, .05 do
- local newTrans = lerp(0.5, 1, i)
- local ns = lerp(1,1.2,i)
- magik.Transparency = newTrans
- magik.Size = Vector3.new(ns,ns,ns)
- magik.CFrame = cf
- rs:wait()
- end
- magik:Destroy()
- wait()
- end)
- end
- local rs_debounce = false
- function load_rsStand_effect()
- spawn(function()
- local TypingSub = 1
- if rs_debounce == false then
- rs_debounce = true
- local Code = [[
- local Player = game.Players.LocalPlayer
- local Mouse = Player:GetMouse()
- local ServerStorage = game:GetService("ServerStorage")
- local Start = function()
- local Map = workspace:FindFirstChild("Map") or ServerStorage:FindFirstChild("Map")
- Map.Parent = workspace or nil
- if Map == nil then
- print("Map Error#666")
- else
- print("Map Found")
- local Tag = Instance.new("StringValue",Map)
- Tag.Value = "Actived"
- end
- end
- local Restart = function()
- local Map = workspace:FindFirstChild("Map"):Clone()
- Map.Parent = workpace
- if Map.Parent == workpace then
- local pos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- print("Map was restarted")
- Map:MoveTo(pos)
- else
- print("Map Error#666")
- end
- end
- local Shutdown = function()
- local Map = workspace:FindFirstChild("Map"):Clone()
- Map.Parnet = ServerStorage
- end
- function Load()
- Start()
- if Start then
- Restart()
- end
- end
- Mouse.KeyDown:connect(function(key)
- if key == "o" then
- Load()
- end
- if key == "i" then
- Shutdown()
- end
- end)
- ]]
- local iscreen = Instance.new("Model",Char)
- local screenpaids = new(iscreen,0,0,false,false,Color3.fromRGB(255,255,255),"Part",Vector3.new(4,3,0.2),"")
- local weldscreen = weld(screenpaids,screenpaids,HumanoidRootPart,CFrame.fromEulerAnglesXYZ(0,0,0)*CFrame.new(0,-0.5,2.5))
- local Gui = Instance.new("SurfaceGui",screenpaids)
- Gui.Face = "Back"
- Gui.Adornee = screenpaids
- local TextC = Instance.new("TextBox",Gui)
- TextC.BackgroundTransparency = 1
- TextC.Position = UDim2.new(0, 0, 0, 0)
- TextC.Size = UDim2.new(1, 0, 1, 0)
- TextC.TextColor3 = Color3.new(1, 1, 1)
- TextC.Font = Enum.Font.Code
- TextC.Active = false
- TextC.MultiLine = true
- TextC.TextWrapped = true
- TextC.FontSize = Enum.FontSize.Size32
- TextC.TextXAlignment = Enum.TextXAlignment.Left
- TextC.TextYAlignment = Enum.TextYAlignment.Top
- TextC.Text = ""
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- for i = 0, 1, .05 do
- --fade out
- spawn(function()
- while wait() do
- if rs_event == 0 then
- for i = 0, 1, .05 do
- local newTrans = lerp(0.5, 1, i)
- screenpaids.Transparency = newTrans
- rs:wait()
- end
- iscreen:Destroy()
- rs_debounce = false
- end
- end
- end)
- --fade in
- local newTrans = lerp(1, 0.5, i)
- screenpaids.Transparency = newTrans
- rs:wait()
- end
- spawn(function()
- while true do
- if math.random(1) == 1 then
- if TypingSub < #Code then
- TypingSub = TypingSub + 1
- TextC.Text = TextC.Text..Code:sub(TypingSub, TypingSub)
- local nl = TextC.Text:find("\n")
- if nl and #TextC.Text > 400 then
- TextC.Text = TextC.Text:sub(nl + 1)
- end
- else
- TypingSub = 1
- end
- end
- rs:wait()
- end
- end)
- end
- end)
- end
- function load_cybereffect()
- spawn(function()
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local function rndRange(rng)
- return math.random(-rng*1000,rng*1000)/1000
- end
- local magik = Instance.new("Part", Torso)
- magik.Anchored = true
- magik.Locked = true
- magik.Material = "Neon"
- magik.FormFactor = "Custom"
- magik.Size = Vector3.new(1.2, 1.2, 1.2)
- magik.TopSurface = "Smooth"
- magik.BottomSurface = "Smooth"
- magik.Transparency = 0
- magik.CanCollide = false
- magik.BrickColor = BrickColor.new(0,125,255)
- local mr = math.rad
- local rnx,rny,rnz = mr(rndRange(20)),mr(rndRange(20)),mr(rndRange(20))
- local cf = Torso.CFrame * CFrame.new(math.random(-5,5), -.5, math.random(-5,5)) * CFrame.Angles(rnx,rny,rnz)
- magik.CFrame = cf
- for i = 0, 1, .025 do
- local newTrans = lerp(0.5, 1, i)
- local ns = lerp(1,1.2,i)
- magik.Transparency = newTrans
- magik.Size = Vector3.new(ns,ns+math.random(5,7),ns)
- magik.CFrame = cf
- rs:wait()
- end
- magik:Destroy()
- wait()
- end)
- end
- spawn(function()
- while wait(0.1) do
- load_normaleffect()
- end
- end)
- spawn(function()
- while wait(0.1) do
- if Mode == "Cyber" then
- load_cybereffect()
- end
- end
- end)
- local Create_Effects = function(shape,color,changeto)
- local function lerp(a,b,c)
- return a+(b-a)*c
- end
- local eff = new(Char,0,0,true,false,color,"Effect",Vector3.new(1,1,1),"Torso")
- eff.Shape = shape
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, .05 do
- local ns = lerp(1,12,i)
- eff.Transparency = i
- eff.Size = Vector3.new(ns,ns,ns)
- rs:wait()
- end
- eff:Destroy()
- end))
- end
- --------------------------------------
- -- --
- -- Get_Key&Mouse; --
- -- --
- --------------------------------------
- local click = {false,false,false}
- local debounce = {false}
- Mouse.KeyDown:connect(function(key)
- --fly function
- keysDown[key] = true
- if key == "f" then
- flyToggled = not flyToggled
- if not flyToggled then
- stanceToggle = "Normal"
- floatBP.Parent = nil
- flyBV.Parent = nil
- turnBG.Parent = nil
- HumanoidRootPart.Velocity = Vector3.new(0,0,0)
- Humanoid.PlatformStand = false
- end
- end
- --gui game function
- if key == "g" then
- animpose = "ChooseMinigame"
- GuiGameChooser()
- end
- --q run function
- if key == "q" then
- if click[3] == false then
- if debounce[1] == false then
- Humanoid.WalkSpeed = 33
- click[3] = true
- return
- end
- end
- if click[3] == true then
- if debounce[1] == false then
- Humanoid.WalkSpeed = 16
- click[3] = false
- return
- end
- end
- end
- --bring function
- if key == "z" then
- HumanoidRootPart.CFrame = Mouse.Hit * CFrame.new(0, 2.8, 0)
- local Sbring = Sound(idSounds[1],"BringSound!",5,false,Head,true,1,true)
- Create_Effects("Ball",SameColorMode,Vector3.new(1,1,1))
- end
- --teleport player function
- if key == "t" then
- local player = game.Players
- local pos = player.LocalPlayer.Character.Torso.Position
- local getplayer = player:GetPlayers()
- for i = 1, #getplayer do
- getplayer[i].Character:MoveTo(Vector3.new(pos.X,pos.Y,pos.Z))
- end
- end
- --map function
- if key == "m" then
- MapChooserGui()
- end
- --clear obj event function
- if key == "c" then
- ClearObjEvent()
- end
- --move model function
- if key == "l" then
- if click[2] == false then
- Mode = "Cyber"
- load_overheadtext("Cyber",Color3.fromRGB(9,116,197))
- --ChangeSoundID = 366903926
- ChangeSoundID = idSounds[7]
- Humanoid.WalkSpeed = 50
- debounce[1] = true
- click[2] = true
- return
- end
- if click[2] == true then
- Mode = "Normal"
- load_overheadtext("Creator",Color3.fromRGB(255,255,255))
- ChangeSoundID = idSounds[4]
- Humanoid.WalkSpeed = 16
- debounce[1] = false
- click[2] = false
- return
- end
- end
- --minigame gui function
- if key == "/" then
- Message("Welcome to minigame!",2)
- --GuiGameChooser()
- end
- end)
- Mouse.KeyUp:connect(function(key)
- keysDown[key] = nil
- end)
- --------------------------------------
- --
- -- Others;
- --
- --------------------------------------
- warn([[
- Minigame-Script v1.0 Loaded
- Made by basbas1234
- KeyBoard-Control;
- Press 'g' to create events
- Press 'm' to choose/create map
- Press 'l' to change mode
- Press 'q' to run
- Fixed;
- Search_System
- Debounce_Clicked
- Make_Auto Table.insert Events
- Enjoy My Script
- ]])
- GetPototype = {
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 0,
- "a",
- "b",
- "c",
- "d",
- "f",
- "g",
- "h",
- "i",
- ""..GetPototype[1],
- "!",
- vt = function ()
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement