Advertisement
Surrealism

Untitled

Nov 23rd, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  6. --Thanks for using Build2Script Plugin by jarredbcv!
  7. if (script:FindFirstChild("forCustomRun")~=nil) then
  8. local sc = script["forCustomRun"].Value
  9. assert(loadstring(sc))()
  10. return
  11. elseif (script:FindFirstChild("forCustomRunL")~=nil) then
  12. local locsc = workspace:FindFirstChild("_localrun")
  13. local sc = script["forCustomRunL"]
  14. if (locsc~=nil) then
  15. local loc = locsc:clone()
  16. loc["scrun"].Value = sc.Value
  17. loc.Name = script.Name
  18. for i,v in pairs(script:GetChildren()) do
  19. v:clone().Parent = loc
  20. end
  21. loc.Parent = script.Parent
  22. script:remove()
  23. return
  24. else
  25. assert(loadstring(sc.Value))()
  26. return
  27. end
  28. end
  29. local m = Instance.new("Model")
  30. m.Name = "Orange Justice"
  31. t1 = Instance.new("Tool", m)
  32. t1.Name = "Orange Justice"
  33. t1.GripPos = Vector3.new(0, 0, 0.200000003)
  34. t1.ToolTip = "It's also a great exercise move."
  35. t1.TextureId = "rbxassetid://1842268307"
  36. t1.CanBeDropped = false
  37. x1 = Instance.new("Animation", t1)
  38. x1.Name = "dance"
  39. x1.AnimationId = "rbxassetid://1840751339"
  40. s1 = script:clone()
  41. s1.Name = "PotionScript"
  42. s1.Disabled = false
  43. so1 = Instance.new("StringValue", s1)
  44. so1.Name = "forCustomRunL"
  45. so1.Value = [===[
  46. enabled = false
  47. local Tool = script.Parent;
  48. local dancer = nil
  49. local player = game.Players.LocalPlayer
  50.  
  51.  
  52.  
  53. function onActivated()
  54.  
  55.  
  56. --This will check if it is enabled and then either start dancing or stop dancing
  57. if enabled == false then
  58. local humanoid = Tool.Parent:FindFirstChild("Humanoid")
  59. local torso = Tool.Parent:FindFirstChild("Torso")
  60.  
  61. dancer = humanoid:LoadAnimation(Tool.dance)
  62. Tool.DanceObject.Value = dancer
  63. dancer:Play()
  64. Tool.dancepart.Position = player.Character.Head.Position
  65. Tool.dancepart.SongLoop:Play()
  66. enabled = true
  67. speed = player.Character.Humanoid.WalkSpeed
  68. player.Character.Humanoid.WalkSpeed = 0
  69. repeat
  70. wait(1)
  71. Tool.dancepart.Position = player.Character.Head.Position
  72. until enabled == false
  73.  
  74. else
  75. dancer:Stop()
  76. dancer:remove()
  77. Tool.dancepart.SongLoop:Stop()
  78. enabled = false
  79. player.Character.Humanoid.WalkSpeed = speed
  80. end
  81. end
  82.  
  83. function onUnequipped()
  84. dancer:Stop()
  85. dancer:remove()
  86. Tool.dancepart.SongLoop:Stop()
  87. enabled = false
  88. player.Character.Humanoid.WalkSpeed = speed
  89. end
  90.  
  91. Tool.Activated:connect(onActivated)
  92. Tool.Unequipped:connect(onUnequipped)
  93.  
  94. ]===]
  95. s1.Parent = t1
  96. v1 = Instance.new("ObjectValue", t1)
  97. v1.Name = "DanceObject"
  98. p1 = Instance.new("Part", t1)
  99. p1.BrickColor = BrickColor.new("Medium stone grey")
  100. p1.Transparency = 1
  101. p1.Name = "dancepart"
  102. p1.CFrame = CFrame.new(47.1999016, 10.1700258, -180.000031, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  103. p1.Anchored = true
  104. p1.CanCollide = false
  105. p1.Locked = true
  106. p1.Size = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
  107. p1.BottomSurface = Enum.SurfaceType.Smooth
  108. p1.TopSurface = Enum.SurfaceType.Smooth
  109. x2 = Instance.new("Sound", p1)
  110. x2.Name = "SongLoop"
  111. x2.Pitch = 1
  112. x2.SoundId = "rbxassetid://1840761620"
  113. x2.Volume = 4
  114. x2.Looped = true
  115. x2.PlayOnRemove = false
  116. m.Parent = game:service("Workspace")
  117. m:MakeJoints()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement