Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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 V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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 every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __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 RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame: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(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- --[[
- Controls
- Q = Mini Ball Blasts
- E = Yellow Shield
- R = SuperBall Blast
- F = Teleport
- --]]
- player = game.Players.LocalPlayer
- char = player.Character
- torso = char.Torso
- neckp = char.Torso.Neck.C0
- neck = char.Torso.Neck
- m=player:GetMouse()
- human = char.Humanoid
- local ChatService = game:GetService("Chat")
- ChatService:Chat(char.Head, "edit by zeddikuss123.")
- local clothes = {}
- for _, clothes in pairs (char:GetChildren()) do
- if clothes:IsA("Accessory") then
- clothes:Remove()
- end
- if clothes:IsA("Shirt") then
- clothes:Remove()
- end
- if clothes:IsA("Pants") then
- clothes:Remove()
- end
- if clothes:IsA("ShirtGraphic") then
- clothes.Graphic = 0
- clothes:Remove()
- end
- end
- wait(1)
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- rng.CanCollide = false
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = char["Head"].CFrame * CFrame.new(0,0,0)
- --rng.Rotation = Vector3.new(math.pi/2,0,0)
- rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- rngm.Scale = Vector3.new(1, 1, 1)
- wait(0.1)
- coroutine.wrap(function()
- for i = 1, 10, .4 do
- rngm.Scale = Vector3.new(1 + i*1, 1 + i*1, 1 + i*1)
- wait()
- end
- wait()
- rng:Destroy()
- wait()
- end)()
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- rng.CanCollide = false
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = char["Head"].CFrame * CFrame.new(0,-2,0)
- rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- rngm.Scale = Vector3.new(1, 1, 1)
- wait(0.1)
- coroutine.wrap(function()
- for i = 1, 10, .4 do
- rngm.Scale = Vector3.new(1 + i*1, 1 + i*1, 1 + i*1)
- wait()
- end
- wait()
- rng:Destroy()
- wait()
- end)()
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- rng.CanCollide = false
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = char["Head"].CFrame * CFrame.new(0,-4,0)
- rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=3270017"
- rngm.Scale = Vector3.new(1, 1, 1)
- wait(0.1)
- coroutine.wrap(function()
- for i = 1, 10, .4 do
- rngm.Scale = Vector3.new(1 + i*1, 1 + i*1, 1 + i*1)
- wait()
- end
- wait()
- rng:Destroy()
- wait()
- end)()
- wait(0.7)
- local rng = Instance.new("Part", char)
- rng.Anchored = true
- rng.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- rng.CanCollide = false
- rng.Name = "Ring"
- rng.Size = Vector3.new(1, 1, 1)
- rng.Transparency = 0
- rng.TopSurface = 0
- rng.BottomSurface = 0
- rng.CFrame = char["Head"].CFrame * CFrame.new(-1,-2.5,0)
- rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))
- local rngm = Instance.new("SpecialMesh", rng)
- rngm.MeshId = "http://www.roblox.com/asset/?id=20329976"
- rngm.Scale = Vector3.new(1, 1, 1)
- wait(0.1)
- coroutine.wrap(function()
- for i = 1, 10, .4 do
- rngm.Scale = Vector3.new(1 + i*1, 1 + i*1, 1 + i*1)
- wait()
- end
- wait()
- rng:Destroy()
- wait()
- end)()
- local s = Instance.new("Sound")
- s.Name = "ee"
- s.SoundId = "rbxassetid://190138868"
- s.Volume = 3
- s.Looped = true
- s.archivable = false
- s.Parent = game.Workspace
- s:play()
- char.Head.BrickColor = BrickColor.new("New Yeller")
- torso.BrickColor = BrickColor.new("New Yeller")
- char["Left Leg"].BrickColor = BrickColor.new("New Yeller")
- char["Left Arm"].BrickColor = BrickColor.new("New Yeller")
- char["Right Leg"].BrickColor = BrickColor.new("New Yeller")
- char["Right Arm"].BrickColor = BrickColor.new("New Yeller")
- char.Head.Material = "Neon"
- torso.Material = "Neon"
- char["Left Leg"].Material = "Neon"
- char["Left Arm"].Material = "Neon"
- char["Right Leg"].Material = "Neon"
- char["Right Arm"].Material = "Neon"
- human.MaxHealth = 2100000000
- wait(0.5)
- human.Health = human.MaxHealth
- wait(0.1)
- human.WalkSpeed = 50
- ---------------------------------------------------------------------------------------------------
- m.KeyDown:connect(function(key)
- if key == "q" then
- for i = 1,15 do
- local pos = m.Hit.p
- local pos1 = torso.Position
- torso.CFrame = CFrame.new(pos1, pos)
- local x = Instance.new("Part")
- x.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- x.FormFactor = "Custom"
- x.Size = Vector3.new(2,2,2)
- x.TopSurface = "Smooth"
- x.BottomSurface = "Smooth"
- x.Shape = "Ball"
- x.Name = "Yellow Balls"
- x.CanCollide = false
- x.Anchored = false
- x.Transparency = 0.1
- local y = Instance.new("BodyVelocity")
- y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- y.velocity = char.Torso.CFrame.lookVector*180
- y.Parent = x
- x.CFrame = player.Character.Torso.CFrame*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-10,-5))* CFrame.Angles(0, math.pi, 0)
- x.Parent = workspace
- x.Touched:connect(function(h)
- local a = h.Parent.Humanoid
- if a.Parent.Name == game.Players.LocalPlayer.Name then
- a:TakeDamage(0)
- elseif h.Parent.ClassName == "Model" then if h.Parent:FindFirstChild("Humanoid") then
- wait(0.2)
- a:TakeDamage(math.huge)
- end
- wait()
- end
- end)
- game.Debris:AddItem(x,5)
- end
- end
- end)
- ---------------------------------------------------------------------------------------------------------
- m.KeyDown:connect(function(key)
- if key == "f" then
- char.Torso.CFrame = m.hit
- end
- end)
- -------------------------------------------------------------------------------------------------------------
- m.KeyDown:connect(function(key)
- if key == "e" then
- org = char.Torso["Left Shoulder"].C0
- char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0 * CFrame.new(-0.3,0,0) * CFrame.Angles(0,0,math.rad(-90))
- k = Instance.new("Part",char)
- k.Name = "Blue Shield"
- k.Size = Vector3.new(5,1,5)
- k.CanCollide = false
- k.BrickColor = BrickColor.new("New Yeller")
- k.TopSurface = 0
- k.BottomSurface = 0
- k.Material = "Neon"
- w = Instance.new("Weld", k)
- w.Part0 = k
- w.Part1 = char["Left Arm"]
- w.C0 = CFrame.new(0,1,0)
- k.Touched:connect(function(j)
- local s = j.Parent.Humanoid
- if s.Parent.Name == player.Name then
- s:TakeDamage(0)
- end
- if j.Parent.ClassName == "Model" then if j.Parent:FindFirstChild("Humanoid") then
- j.Parent.Torso.Velocity = CFrame.new(torso.Position,j.Parent.Torso.Position).lookVector * 900
- wait(0.2)
- s:TakeDamage(math.huge)
- wait()
- j.Parent.Torso.Velocity = stop
- end
- end
- end)
- wait(10)
- k:Destroy()
- torso["Left Shoulder"].C0 = org
- wait(0.1)
- end
- end)
- -----------------------------------------------------------------------------------------------------------
- local A=Instance.new'Animation'
- A.AnimationId='rbxassetid://33796059'
- local P=game:GetService'Players'.LocalPlayer
- local C=P.Character or P.CharacterAdded:Wait()
- local H=C:WaitForChild'Humanoid':LoadAnimation(A)
- H:Play()
- H:AdjustSpeed(1000000)
- while true do
- wait (0)
- char.Head.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- torso.BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- char["Left Leg"].BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- char["Left Arm"].BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- char["Right Leg"].BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- char["Right Arm"].BrickColor = BrickColor.new(math.random(), math.random(), math.random())
- char.Head.Material = "Neon"
- torso.Material = "Neon"
- char["Left Leg"].Material = "Neon"
- char["Left Arm"].Material = "Neon"
- char["Right Leg"].Material = "Neon"
- char["Right Arm"].Material = "Neon"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement