Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.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,Connect=function(self,f)self.Function=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 and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- 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 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})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- 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)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- local admins = {
- ["Hatuey_Yael"] = 'Admin';
- ["TameDoNotCLick"] = 'Admin';
- ["AltSkittles"] = 'Admin';
- ["Dem_SkittlesDo"] = 'Admin';
- ["unknown"] = 'Admin';
- ["Player1"] = 'Admin';
- ["saltnvinigerchips"] = 'Admin';
- }
- local part = Instance.new("Part")
- local mesh = Instance.new("SpecialMesh")
- local weld = Instance.new("Weld")
- local sound = Instance.new("Sound")
- part.Parent = owner.Character.Head
- part.Size = Vector3.new(3.237, 1.909, 1.506)
- sound.Parent = part
- sound.SoundId = "rbxassetid://2778425335"
- sound.MaxDistance = 1000
- sound.Volume = 100
- sound.Looped = true
- sound.PlaybackSpeed = 1
- sound:Play()
- for i,v in pairs(game.Players:GetPlayers()) do
- if admins[v.Name] then
- print("An admin is in the server")
- owner.Chatted:connect(function(msg)
- if msg:sub(1,5) == "play " or msg:sub(1,5) == "Play " then
- sound:Stop()
- sound.SoundId = "rbxassetid://" ..msg:sub(6)
- sound:Play()
- elseif msg:sub(1,6) == "pitch " or msg:sub(1,6) == "Pitch " then
- sound.PlaybackSpeed = msg:sub(7)
- elseif msg:sub(1,7) == "volume " or msg:sub(1,7) == "Volume " then
- sound.Volume = msg:sub(8)
- elseif msg:sub(1,9) == "distance " or msg:sub(1,9) == "Distance " then
- sound.MaxDistance = msg:sub(10)
- end
- end)
- end
- end
- mesh.Parent = part
- mesh.MeshId = "rbxassetid://2511970016"
- mesh.TextureId = "rbxassetid://2511970101"
- weld.Parent = owner.Character.Head
- weld.Part0 = part
- weld.Part1 = owner.Character.Head
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
- weld.C0 = CFrame.new(2, 0, 5)
- while true do
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 1.9, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 2.9, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 3.9, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 4.9, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 5.9, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.1, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.2, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.3, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.4, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.5, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.6, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.7, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.8, 0)
- wait()
- weld.C1 = CFrame.fromEulerAnglesXYZ(0, 6.9, 0)
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement