Untitled

Run Settings
LanguageLua
Language Version
Run Command
print("FE code by Starzozero, Thanks to him!") if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end local Player,game,owner = owner,game local RealPlayer = Player do print("FE Compatibility code by Mokiros, Edited by StarzoZero") local rp = RealPlayer script.Parent = rp.Character --RemoteEvent for communicating local Event = Instance.new("RemoteEvent") Event.Name = "UserInput_Event" --Fake event to make stuff like Mouse.KeyDown work local function fakeEvent() local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} t.connect = t.Connect return t end --Creating fake input objects with fake variables local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil end} --Merged 2 functions into one by checking amount of arguments CAS.UnbindAction = CAS.BindAction --This function will trigger the events that have been :Connect()'ed local function te(self,ev,...) local t = m[ev] if t and t._fakeEvent then for _,f in pairs(t.Functions) do f(...) end end end m.TrigEvent = te UIS.TrigEvent = te Event.OnServerEvent:Connect(function(plr,io) if plr~=rp then return end m.Target = io.Target m.Hit = io.Hit if not io.isMouse then local b = io.UserInputState == Enum.UserInputState.Begin if io.UserInputType == Enum.UserInputType.MouseButton1 then return m:TrigEvent(b and "Button1Down" or "Button1Up") end if io.UserInputType == Enum.UserInputType.MouseButton2 then return m:TrigEvent(b and "Button2Down" or "Button2Up") end for _,t in pairs(CAS.Actions) do for _,k in pairs(t.Keys) do if k==io.KeyCode then t.Function(t.Name,io.UserInputState,io) end end end m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) end end) Event.Parent = NLS([==[ local Player = game:GetService("Players").LocalPlayer local Event = script:WaitForChild("UserInput_Event") local Mouse = Player:GetMouse() local UIS = game:GetService("UserInputService") local input = function(io,a) if a then return end --Since InputObject is a client-side instance, we create and pass table instead Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) end UIS.InputBegan:Connect(input) UIS.InputEnded:Connect(input) local h,t --Give the server mouse data 30 times every second, but only if the values changed --If player is not moving their mouse, client won't fire events while wait(1/30) do if h~=Mouse.Hit or t~=Mouse.Target then h,t=Mouse.Hit,Mouse.Target Event:FireServer({isMouse=true,Target=t,Hit=h}) end end]==],Player.Character) ----Sandboxed game object that allows the usage of client-side methods and services --Real game object local _rg = game --Metatable for fake service local fsmt = { __index = function(self,k) local s = rawget(self,"_RealService") if s then return typeof(s[k])=="function" and function(_,...)return s[k](s,...)end or s[k] end end, __newindex = function(self,k,v) local s = rawget(self,"_RealService") if s then s[k]=v end end } local function FakeService(t,RealService) t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService return setmetatable(t,fsmt) end --Fake game object local g = { GetService = function(self,s) return rawget(self,s) or _rg:GetService(s) end, Players = FakeService({ LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) },"Players"), UserInputService = FakeService(UIS,"UserInputService"), ContextActionService = FakeService(CAS,"ContextActionService"), RunService = FakeService({ _btrs = {}, RenderStepped = _rg:GetService("RunService").Heartbeat, BindToRenderStep = function(self,name,_,fun) self._btrs[name] = self.Heartbeat:Connect(fun) end, UnbindFromRenderStep = function(self,name) self._btrs[name]:Disconnect() end, },"RunService") } rawset(g.Players,"localPlayer",g.Players.LocalPlayer) g.service = g.GetService FakeService(g,game) --Changing owner to fake player object to support owner:GetMouse() game,owner = g,g.Players.LocalPlayer end local plr = game:GetService("Players").LocalPlayer local char = plr.Character local tweenserv = game:GetService("TweenService") local hum = char:FindFirstChildOfClass("Humanoid") local mou = plr:GetMouse() local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") local head = char:FindFirstChild("Head") local face = head:FindFirstChildOfClass("Decal") local neck = tor:FindFirstChild("Neck") local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm") local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm") local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg") local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg") local ls = tor:FindFirstChild("Left Shoulder") local rs = tor:FindFirstChild("Right Shoulder") local throwok = true local hitok = true local bullet = 1 local equipped = false local canreload = true local startr = rs.C1 local startl = ls.C1 local freezed = false local clicked = false local ball = Instance.new("Tool", plr.Backpack) ball.Name = "flare gun" ball.CanBeDropped = false local rhan = Instance.new("Part", ball) rhan.Size = Vector3.new(1, 1, 1) rhan.Name = "Handle" local mesh = Instance.new("SpecialMesh", rhan) mesh.MeshType = "FileMesh" mesh.Offset = Vector3.new(0, 0.2, -0.5) mesh.MeshId = "rbxassetid://443983595" mesh.TextureId = "rbxassetid://443983604" mesh.Scale = Vector3.new(0.015, 0.015, 0.015) local handle = Instance.new("Part", rhan) handle.Size = Vector3.new(0.6, 0.2, 0.2) handle.Shape = "Cylinder" handle.Material = "Neon" handle.BrickColor = BrickColor.new("Crimson") handle.TopSurface = "Smooth" handle.BottomSurface = "Smooth" handle.CanCollide = false handle.Name = "Flare" local handlew = Instance.new("Weld", handle) handlew.Part0 = rhan handlew.Part1 = handle handlew.C1 = CFrame.new(0.8, -0.6, 0) * CFrame.Angles(0, math.rad(90), 0) local fire = true local fremit = Instance.new("ParticleEmitter", handle) fremit.EmissionDirection = "Left" fremit.Enabled = false fremit.Rate = 500 fremit.Speed = NumberRange.new(100) fremit.SpreadAngle = Vector2.new(10, 10) fremit.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 255))}) fremit.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 0, 0), NumberSequenceKeypoint.new(1, 10, 0)}) fremit.Texture = "rbxassetid://11601064" fremit.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0, 0), NumberSequenceKeypoint.new(1, 1, 0)}) fremit.LightEmission = 1 fremit.LightInfluence = 1 fremit.Lifetime = NumberRange.new(0.6) ball.Activated:connect(function() if bullet == 1 then if throwok == true and fire == true then throwok = false bullet = 0 local fakehandle = handle:Clone() fakehandle.Parent = workspace local fakew = fakehandle:FindFirstChildOfClass("Weld") fakew:Destroy() handle.Transparency = 1 local emit = Instance.new("ParticleEmitter", fakehandle) emit.SpreadAngle = Vector2.new(360, 360) emit.Speed = NumberRange.new(688705835) emit.Lifetime = NumberRange.new(2) emit.Rate = 1 emit.RotSpeed = NumberRange.new(10) emit.Texture = "rbxassetid://11601064" emit.LightEmission = 0.5 emit.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1, 0), NumberSequenceKeypoint.new(0.701, 4.5, 0), NumberSequenceKeypoint.new(1, 0, 0)}) emit.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(0.453, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(0.632, Color3.fromRGB(38, 38, 38)), ColorSequenceKeypoint.new(1, Color3.fromRGB(35, 35, 35))}) local bv = Instance.new("BodyVelocity", fakehandle) bv.Velocity = mou.Hit.lookVector * 500 bv.MaxForce = Vector3.new(100, 100, 100) if not rhan:FindFirstChild("shasdasdasdasd") then local shsound = Instance.new("Sound", rhan) shsound.SoundId = "rbxassetid://3184041930" shsound.Volume = 5 shsound.Name = "shasdasdasdasd" shsound:Play() elseif rhan:FindFirstChild("shasdasdasdasd") then local shsound2 = rhan:FindFirstChild("shasdasdasdasd") shsound2:Play() end fakehandle.Touched:connect(function(hit) if hit:IsA("BasePart") and hit.Name ~= "Handle" and hit.Name ~= "Flare" and not hit:IsDescendantOf(char) then if hitok == true then hitok = false fakehandle:Destroy() hitok = true if hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent.Name ~= char.Name then local owhum = hit.Parent:FindFirstChildOfClass("Humanoid") owhum.Health = owhum.health - 30 fakehandle:Destroy() hitok = true for i,v in pairs(hit.Parent:GetChildren()) do if v:IsA("Part") then local burntemit = emit:Clone() burntemit.Parent = v burntemit.Lifetime = NumberRange.new(1) burntemit.Rate = 200 end end for i = 1, 10 do owhum.Health = owhum.Health - 10 wait(0.8) end end end end wait(1) throwok = true end) elseif bullet == 0 and canreload == true and fire == true then if not rhan:FindFirstChild("asohaoiutrvhaoeitvh") then local clicso = Instance.new("Sound", rhan) clicso.SoundId = "rbxassetid://292201848" clicso.Volume = 5 clicso.Name = "asohaoiutrvhaoeitvh" clicso:Play() elseif rhan:FindFirstChild("asohaoiutrvhaoeitvh") then local clicso2 = rhan:FindFirstChild("asohaoiutrvhaoeitvh") clicso2:Play() end end if throwok == true and fire == false then clicked = true fremit.Enabled = true sprsou = Instance.new("Sound", handle) sprsou.Volume = 10 sprsou.SoundId = "rbxassetid://843338638" sprsou.Looped = true sprsou:Play() while clicked == true do wait() local thepos = handle.CFrame * CFrame.new(40, 0, 0) frehit = handle:Clone() frehit:ClearAllChildren() frehit.Parent = workspace frehit.Shape = "Cylinder" frehit.Material = "Plastic" frehit.Transparency = 1 frehit.Size = Vector3.new(0.1, 9, 9) frehit.Name = "awirhaoriajv" frev = Instance.new("BodyVelocity", frehit) frev.Velocity = thepos.rightVector * -80 frev.MaxForce = Vector3.new(10000, 10000, 10000) game:GetService("Debris"):AddItem(frehit, 0.7) frehit.Touched:connect(function(hit) if hit:IsA("BasePart") and not hit.Parent:FindFirstChildOfClass("Humanoid") and freezed == false and not hit:IsDescendantOf(char) and hit.Name ~= "awirhaoriajv" and hit.Name ~= "Base" and hit.Name ~= "Baseplate" then freezed = true hit.Material = "Ice" hit.Reflectance = 0.5 hit.BrickColor = BrickColor.new("Pastel Blue") hit.Anchored = true wait(0.2) freezed = false elseif hit.Parent:FindFirstChildOfClass("Humanoid") and freezed == false and not hit:IsDescendantOf(char) then freezed = true local frechar = hit.Parent local fretor = frechar:FindFirstChild("Torso") or frechar:FindFirstChild("UpperTorso") local freice = Instance.new("Part", frechar) freice.CFrame = fretor.CFrame freice.BrickColor = BrickColor.new("Pastel Blue") freice.Reflectance = 0.5 freice.Transparency = 0.4 freice.Material = "Ice" freice.Anchored = true freice.Size = Vector3.new(4.5, 6, 3.5) freice.Name = "iceconesixtyseven" local fresou = Instance.new("Sound", freice) fresou.Volume = 5 fresou.SoundId = "rbxassetid://268249319" fresou:Play() local frehum = frechar:FindFirstChildOfClass("Humanoid") frehum.Health = frehum.Health - 1 for i,v in pairs(frechar:GetChildren()) do if v:isA("BasePart") then v.Anchored = true v.BrickColor = BrickColor.new("Pastel Blue") v.Reflectance = 0.5 v.Material = "Ice" end end wait(0.2) freezed = false end end) end end end ball.Deactivated:connect(function() fremit.Enabled = false clicked = false if sprsou then sprsou:Stop() sprsou:Destroy() end if frehit then frehit:Destroy() end end) ball.Equipped:connect(function() equipped = true end) ball.Unequipped:connect(function() equipped = false end) function pressed(key) if key == "r" and equipped == true and bullet == 0 and canreload == true and fire == true then canreload = false local finishr = startr * CFrame.Angles(math.rad(-45), 0, math.rad(45)) local finishl = startl * CFrame.Angles(math.rad(-50), math.rad(30), math.rad(100)) local finishl2 = startl * CFrame.Angles(math.rad(30), math.rad(60), 0) for i = 0,1,.1 do rs.C1 = startr:lerp(finishr, i) ls.C1 = startl:lerp(finishl, i) wait() end for i = 0,1,.1 do ls.C1 = finishl:lerp(finishl2, i) wait() end local relso = Instance.new("Sound", rhan) relso.SoundId = "rbxassetid://506273075" relso.Volume = 5 relso:Play() game:GetService("Debris"):AddItem(relso, 1.5) for i = 0,1,.1 do ls.C1 = ls.C1:lerp(startl, i) rs.C1 = rs.C1:lerp(startr, i) wait() end bullet = 1 handle.Transparency = 0 canreload = true elseif key == "q" and equipped == true and fire == false then fire = true mesh.TextureId = "rbxassetid://443983604" elseif key == "q" and equipped == true and fire == true then fire = false mesh.TextureId = "rbxassetid://1578721503" elseif key == "p" then if tor:FindFirstChildOfClass("Sound") and tor:FindFirstChild("asdddddd") then local hi = tor:FindFirstChild("asdddddd") hi:Destroy() end if not tor:FindFirstChild("yasdawoirhtvoaeityu") then local yes = Instance.new("Sound", tor) yes.SoundId = "rbxassetid://141349049" yes.Volume = 10 yes.Name = "yasdawoirhtvoaeityu" yes:Play() elseif tor:FindFirstChild("yasdawoirhtvoaeityu") then local yes2 = tor:FindFirstChild("yasdawoirhtvoaeityu") yes2:Play() end end end mou.KeyDown:connect(pressed) end)
Editor Settings
Theme
Key bindings
Full width
Lines