Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has convert to FE by who i don't know?
- -----------------------------------------------------
- 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 | Showcase by Bacon Hair!")
- 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()}
- 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
- 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 s[k] end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end,
- __call = function(self,...)
- local s = rawget(self,"_RealService")
- if s then return s(...) 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 self[s]
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- g.RunService = FakeService({
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- setmetatable(g,{
- __index=function(self,s)
- return _rg:GetService(s) or typeof(_rg[s])=="function"
- and function(_,...)return _rg[s](_rg,...)end or _rg[s]
- end,
- __newindex = fsmt.__newindex,
- __call = fsmt.__call
- })
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- ----// Click to destroy by krit2552 Enjoy! Helper VictoriaChristophe
- local p = game.Players.LocalPlayer
- local char = p.Character
- local hum = char.Humanoid
- hum.MaxHealth = math.huge
- hum.Health = math.huge
- Instance.new("ForceField",char).Visible = false
- local mouse = p:GetMouse()
- local soundPart
- local soundStart = Instance.new("Sound",char.Torso)
- soundStart.Volume = 0
- soundStart.SoundId = "rbxassetid://407239668"
- local soundRun = Instance.new("Sound",char.Torso)
- soundRun.Volume = 0
- soundRun.Looped = true
- soundRun.SoundId = "rbxassetid://407218731"
- local down = false
- function FireLaser(a, b)
- if (soundPart) then
- soundPart.CFrame = b
- end
- local a2 = Instance.new("Part", char)
- local b2 = Instance.new("SpecialMesh", a2)
- b2.MeshType = "Cylinder"
- a2.Material = "Neon"
- a2.TopSurface = "Smooth"
- a2.BottomSurface = "Smooth"
- a2.Anchored = true
- a2.CanCollide = false
- a2.Transparency = 1
- touchCounter = 0
- local cR=255
- local cG=0
- local cB=0
- local flg5=1 local omgidk=1
- local add=50
- game:GetService("RunService"):BindToRenderStep("Ghost",1,function()
- if omgidk>10000 then omgidk=0 end
- omgidk=omgidk+1
- if cR>=255 then flg5=1 end
- if cG>=255 then flg5=2 end
- if cB>=255 then flg5=3 end
- if flg5==1 then cR=cR-add cG=cG+add end
- if flg5==2 then cG=cG-add cB=cB+add end
- if flg5==3 then cB=cB-add cR=cR+add end
- color=Color3.fromRGB(cR,cG,cB)
- a2.Color = color
- end)
- local c = Instance.new("ParticleEmitter", a2)
- c.Color = ColorSequence.new(a2.BrickColor.Color, Color3.new(1, 1, 1))
- c.Size = NumberSequence.new(0.1, 0.2)
- c.Lifetime = NumberRange.new(0.3, 0.7)
- c.Rate = 0
- c.EmissionDirection = "Right"
- c.Speed = NumberRange.new(6, 12)
- c.VelocitySpread = 0
- local function CreateRegion3FromLocAndSize(Position, Size)
- local SizeOffset = Size/2
- local Point1 = Position - SizeOffset
- local Point2 = Position + SizeOffset
- return Region3.new(Point1, Point2)
- end
- local reg = CreateRegion3FromLocAndSize(b.p, Vector3.new(10, 10, 10))
- local index = 0
- local small = 1000
- local purts = {}
- for i, v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, char:GetChildren(), 100)) do
- table.insert(purts, v)
- end
- for i, v in pairs(purts) do
- if (b.p - v.Position).magnitude < small and v.Name ~= "Baseplate" and not v:FindFirstChild("SurfaceGui") and v.Name ~= "Base" and v ~= workspace.Terrain then
- small = (b.p - v.Position).magnitude
- index = i
- end
- end
- if index ~= 0 then
- b = purts[index].CFrame
- end
- local dis = (a.p - b.p).magnitude
- a2.Size = Vector3.new(dis, 1.3, 1.3)
- b2.Scale = Vector3.new(0, 1.3, 1.3)
- a2.CFrame = CFrame.new(a.p, b.p) * CFrame.new(0, 0, -dis / 2) * CFrame.Angles(0, math.rad(90), 0)
- for i = 0.2, 0, -0.1 do
- b2.Scale = Vector3.new(1, i, i)
- wait()
- end
- a2:Destroy()
- pcall(function() purts[index]:Destroy() end)
- wait()
- --t:Destroy()
- end
- mouse.Button1Down:connect(function()
- down = true
- local t = Instance.new("Part", char)
- t.Size = Vector3.new(0.2, 0.2, 0.2)
- t.Anchored = true
- t.CanCollide = false
- t.Transparency = 1
- local s = Instance.new("Sound", t)
- s.Looped = true
- s.SoundId = "rbxassetid://407218786"
- soundPart = t
- local c = Instance.new("ParticleEmitter", t)
- c.Color = ColorSequence.new(char.Torso.BrickColor.Color, Color3.new(1, 1, 1))
- c.LightEmission = 1
- c.Size = NumberSequence.new(0.2, 0.3)
- c.Lifetime = NumberRange.new(0.3, 0.7)
- c.Rate = 0
- c.EmissionDirection = "Back"
- c.Speed = NumberRange.new(5, 10)
- c.VelocitySpread = 0
- soundStart:play()
- soundRun:play()
- end)
- mouse.Button1Up:connect(function()
- down = false
- if (soundPart) then
- soundPart.Sound:stop()
- soundPart:Destroy()
- end
- soundStart:stop()
- soundRun:stop()
- end)
- game:GetService("RunService").Heartbeat:connect(function()
- if down then
- FireLaser(char.Torso.CFrame, mouse.Hit)
- end
- end)
- MRANDOM = math.random
- local MATHS = {"0", "1", "3", "2", "4", "5", "6", "7", "8", "9", "10"}
- spawn(function()
- while wait() do
- hum.Name = MATHS[MRANDOM(1,#MATHS)].."V"..MATHS[MRANDOM(1,#MATHS)].."I"..MATHS[MRANDOM(1,#MATHS)].."C"..MATHS[MRANDOM(1,#MATHS)].."T"..MATHS[MRANDOM(1,#MATHS)].."T"..MATHS[MRANDOM(1,#MATHS)].."O"..MATHS[MRANDOM(1,#MATHS)].."R"..MATHS[MRANDOM(1,#MATHS)].."I"..MATHS[MRANDOM(1,#MATHS)].."A"..MATHS[MRANDOM(1,#MATHS)]
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement