Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")
- 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
- if owner.Name == "Erik_2013death" or owner.Name == "g0x21B" then
- mas = game.Players.LocalPlayer.Backpack
- Tool0 = Instance.new("Tool")
- Tool0.CanBeDropped = true
- Part1 = Instance.new("Part")
- SpecialMesh2 = Instance.new("SpecialMesh")
- Part3 = Instance.new("Part")
- Decal4 = Instance.new("Decal")
- Decal5 = Instance.new("Decal")
- BlockMesh6 = Instance.new("BlockMesh")
- CFrameValue7 = Instance.new("CFrameValue")
- Weld8 = Instance.new("Weld")
- Tool0.Name = "stop"
- Tool0.Parent = mas
- Tool0.Grip = CFrame.new(0, -4, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Tool0.GripPos = Vector3.new(0, -4, 0)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(35.5958214, 7.466609, -134.840622, -0.662298739, -0.0162105355, 0.749064386, 6.58125927e-08, 0.999765873, 0.0216360372, -0.749239743, 0.0143295703, -0.662143707)
- Part1.Orientation = Vector3.new(-1.24000001, 131.479996, 0)
- Part1.Position = Vector3.new(35.5958214, 7.466609, -134.840622)
- Part1.Rotation = Vector3.new(-178.130005, 48.5099983, 178.600006)
- Part1.Size = Vector3.new(1, 8, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = Part1
- SpecialMesh2.Scale = Vector3.new(0.5, 1.20000005, 0.5)
- Part3.Name = "Sign"
- Part3.Parent = Tool0
- Part3.CFrame = CFrame.new(34.806324, 9.9443903, -134.142731, 0.662298739, -0.0162105355, -0.749064386, -6.58125927e-08, 0.999765873, -0.0216360372, 0.749239743, 0.0143295703, 0.662143707)
- Part3.Orientation = Vector3.new(1.24000001, -48.5200005, 0)
- Part3.Position = Vector3.new(34.806324, 9.9443903, -134.142731)
- Part3.Rotation = Vector3.new(1.87, -48.5099983, 1.39999998)
- Part3.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part3.Transparency = 1
- Part3.Size = Vector3.new(3, 3, 1)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.BrickColor = BrickColor.new("Bright yellow")
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.brickColor = BrickColor.new("Bright yellow")
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.formFactor = Enum.FormFactor.Symmetric
- Decal4.Parent = Part3
- Decal4.Texture = "http://www.roblox.com/asset/?id=116620938"
- Decal4.Face = Enum.NormalId.Back
- Decal5.Parent = Part3
- Decal5.Texture = "http://www.roblox.com/asset/?id=116620941"
- BlockMesh6.Parent = Part3
- BlockMesh6.Offset = Vector3.new(0, 0, -0.74000001)
- BlockMesh6.Scale = Vector3.new(1.5, 1.5, 0)
- CFrameValue7.Name = "qRelativeCFrameWeldValue"
- CFrameValue7.Parent = Part3
- CFrameValue7.Value = CFrame.new(-1.90734863e-06, -2.5, -0.99987793, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Weld8.Name = "qCFrameWeldThingy"
- Weld8.Parent = Part3
- Weld8.C1 = CFrame.new(-1.90734863e-06, -2.5, -0.99987793, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Weld8.Part0 = Part1
- Weld8.Part1 = Part3
- Weld8.part1 = Part3
- stop = Tool0
- smacking = false
- towering = false
- stop.Activated:Connect(function()
- coroutine.resume(coroutine.create(function()
- wait(0.1)
- smacking = true
- wait(0.3)
- smacking = false
- towering = false
- end))
- local Anim = Instance.new("StringValue",stop)
- Anim.Name = "toolanim"
- Anim.Value = "Slash"
- stop.Parent.Humanoid:LoadAnimation(Anim)
- end)
- function lerp(weld,startpos,endpos,amntime,longatend)
- local waited = 0
- for i=1,amntime*100 do
- if longatend == true then
- startpos = weld.C0
- end
- weld.C0 = startpos:lerp(endpos,i/(amntime*100))
- wait(0.01)
- waited=waited+0.01
- end
- end
- function weldxd(thing2,thing1)
- w = Instance.new("Weld")
- w.Part0 = thing2
- w.Part1 = thing1
- w.C0 = thing2.CFrame:inverse()
- w.C1 = thing1.CFrame:inverse()
- w.Parent = thing1
- end
- stop.Sign.Touched:Connect(function(part)
- if part.Anchored == false and smacking == true and towering == false then
- towering = true
- Part0 = Instance.new("Part")
- Part0.Anchored = true
- local hahahhhh = part
- Part1 = Instance.new("Part")
- BlockMesh2 = Instance.new("BlockMesh")
- Weld3 = Instance.new("Weld")
- Part4 = Instance.new("Part")
- BlockMesh5 = Instance.new("BlockMesh")
- Weld6 = Instance.new("Weld")
- Part0.Name = "towerb"
- Part0.Parent = workspace
- Part0.CFrame = CFrame.new(81.5, 40, -238, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(81.5, 40, -238)
- Part0.Size = Vector3.new(20, 80, 20)
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part1.Parent = Part0
- Part1.CFrame = CFrame.new(81.5, 40, -238, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(81.5, 40, -238)
- Part1.Size = Vector3.new(20, 80, 20)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- BlockMesh2.Parent = Part1
- BlockMesh2.Offset = Vector3.new(0, 40, 0)
- BlockMesh2.Scale = Vector3.new(0.100000001, 0.5, 0.100000001)
- Weld3.Parent = Part0
- Weld3.Part0 = Part0
- Weld3.Part1 = Part1
- Weld3.part1 = Part1
- Part4.Name = "2"
- Part4.Parent = Part0
- Part4.CFrame = CFrame.new(81.5, 40, -238, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(81.5, 40, -238)
- Part4.Size = Vector3.new(20, 80, 20)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part0.CanCollide = false
- Part1.CanCollide = false
- BlockMesh5.Parent = Part4
- BlockMesh5.Offset = Vector3.new(37, 0, 8)
- Weld6.Parent = Part0
- Weld6.Part0 = Part0
- --w = Instance.new("Weld")
- --w.Part0 = Part0
- --w.Part1 = part
- --w.C0 = Part0.CFrame:inverse()
- --w.C1 = part.CFrame:inverse()
- Weld6.Part1 = Part4
- Weld6.part1 = Part4
- coroutine.resume(coroutine.create(function()
- Part0.Touched:Connect(function(hit)
- if hit == part then
- EXP1 = Instance.new('Sound')
- EXP1.Parent = Part0
- EXP1.Name = "9/11"
- EXP1.Playing = true
- EXP1.SoundId = "rbxassetid://165969964"
- EXP1.Volume = 10
- EXP1.TimePosition = 0
- EXP1:Play()
- if part.Parent:FindFirstChildOfClass("Humanoid") then
- part.Parent:FindFirstChildOfClass("Humanoid").Health = 0
- end
- end
- if part.Parent.Parent:FindFirstChildOfClass("Humanoid") then
- part.Parent.Parent:FindFirstChildOfClass("Humanoid").Health = 0
- end
- end)
- end))
- --w.Parent = part
- coroutine.resume(coroutine.create(function()
- while wait() do
- --part.Anchored = true
- --part.CFrame = CFrame.new(part.Position, Part0)
- --part.CFrame = part.CFrame * CFrame.new(0,0,-50)
- end
- end))
- Part0.CFrame = Tool0.Parent.HumanoidRootPart.CFrame * CFrame.new(0,40 + 2,-500)
- byeeee = Instance.new("BodyPosition",part)
- --byeeee.MaxForce = Vector3.new(500000000, 500000000, 500000000)
- byeeee.Position = Part0.Position -- have fun at mars
- if part.Parent.ClassName == 'Model' and part.Parent:FindFirstChild("Head") then
- for i,v in pairs(part.Parent:GetChildren()) do
- if v ~= part then
- byeeeee = Instance.new("BodyPosition",v)
- --byeeeee.MaxForce = Vector3.new(500000000, 500000000, 500000000)
- byeeeee.Position = Part0.Position -- have fun at mars
- end
- end
- AAAAAA = Instance.new("Sound",part.Parent.Head)
- AAAAAA.Volume = 1
- AAAAAA.SoundId = 'rbxassetid://271550300'
- AAAAAA.Looped = true
- AAAAAA:Play()
- AAAAAA.TimePosition = 1.5
- end
- end
- end)
- else
- game:GetService("Chat"):Chat(owner.Character.Head, "not whitelisted noob", Enum.ChatColor.White)
- end
Add Comment
Please, Sign In to add comment