Advertisement
Mediakiller7Cool

Waadfadad

Apr 29th, 2019
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. local SKILLTEXTCOLOR = BRICKC"Lavender".Color
  2. local SKILLFONT = "Bodoni"
  3. local SKILLTEXTSIZE = 7
  4.  
  5. Humanoid.Died:connect(function()
  6. refit()
  7. end)
  8.  
  9. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  10. local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  11. local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  12. local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  13. local SKILL5FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.365, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  14.  
  15. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
  16. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
  17. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Inferno Ring", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
  18. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
  19. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Prison Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
  20. --https://github.com/Mokiros/roblox-FE-compatibility
  21. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  22. local Player,game,owner = owner,game
  23. local RealPlayer = Player
  24. do
  25. print("FE Compatibility code V2 by Mokiros")
  26. local RealPlayer = RealPlayer
  27. script.Parent = RealPlayer.Character
  28.  
  29. --Fake event to make stuff like Mouse.KeyDown work
  30. local Disconnect_Function = function(this)
  31. this[1].Functions[this[2]] = nil
  32. end
  33. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  34. local FakeEvent_Metatable = {__index={
  35. Connect = function(this,f)
  36. local i = tostring(math.random(0,10000))
  37. while this.Functions[i] do
  38. i = tostring(math.random(0,10000))
  39. end
  40. this.Functions[i] = f
  41. return setmetatable({this,i},Disconnect_Metatable)
  42. end
  43. }}
  44. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  45. local function fakeEvent()
  46. return setmetatable({Functions={}},FakeEvent_Metatable)
  47. end
  48.  
  49. --Creating fake input objects with fake variables
  50. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  51. FakeMouse.keyUp = FakeMouse.KeyUp
  52. FakeMouse.keyDown = FakeMouse.KeyDown
  53. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  54. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  55. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  56. end}
  57. --Merged 2 functions into one by checking amount of arguments
  58. CAS.UnbindAction = CAS.BindAction
  59.  
  60. --This function will trigger the events that have been :Connect()'ed
  61. local function TriggerEvent(self,ev,...)
  62. for _,f in pairs(self[ev].Functions) do
  63. f(...)
  64. end
  65. end
  66. FakeMouse.TriggerEvent = TriggerEvent
  67. UIS.TriggerEvent = TriggerEvent
  68.  
  69. --Client communication
  70. local Event = Instance.new("RemoteEvent")
  71. Event.Name = "UserInput_Event"
  72. Event.OnServerEvent:Connect(function(plr,io)
  73. if plr~=RealPlayer then return end
  74. FakeMouse.Target = io.Target
  75. FakeMouse.Hit = io.Hit
  76. if not io.isMouse then
  77. local b = io.UserInputState == Enum.UserInputState.Begin
  78. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  79. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  80. end
  81. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  82. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  83. end
  84. for _,t in pairs(CAS.Actions) do
  85. for _,k in pairs(t.Keys) do
  86. if k==io.KeyCode then
  87. t.Function(t.Name,io.UserInputState,io)
  88. end
  89. end
  90. end
  91. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  92. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  93. end
  94. end)
  95. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  96. local Mouse = owner:GetMouse()
  97. local UIS = game:GetService("UserInputService")
  98. local input = function(io,RobloxHandled)
  99. if RobloxHandled then return end
  100. --Since InputObject is a client-side instance, we create and pass table instead
  101. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  102. end
  103. UIS.InputBegan:Connect(input)
  104. UIS.InputEnded:Connect(input)
  105. local h,t
  106. --Give the server mouse data every second frame, but only if the values changed
  107. --If player is not moving their mouse, client won't fire events
  108. local HB = game:GetService("RunService").Heartbeat
  109. while true do
  110. if h~=Mouse.Hit or t~=Mouse.Target then
  111. h,t=Mouse.Hit,Mouse.Target
  112. Event:FireServer({isMouse=true,Target=t,Hit=h})
  113. end
  114. --Wait 2 frames
  115. for i=1,2 do
  116. HB:Wait()
  117. end
  118. end]==],script)
  119.  
  120. ----Sandboxed game object that allows the usage of client-side methods and services
  121. --Real game object
  122. local RealGame = game
  123.  
  124. --Metatable for fake service
  125. local FakeService_Metatable = {
  126. __index = function(self,k)
  127. local s = rawget(self,"_RealService")
  128. if s then
  129. return typeof(s[k])=="function"
  130. and function(_,...)return s[k](s,...)end or s[k]
  131. end
  132. end,
  133. __newindex = function(self,k,v)
  134. local s = rawget(self,"_RealService")
  135. if s then s[k]=v end
  136. end
  137. }
  138. local function FakeService(t,RealService)
  139. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  140. return setmetatable(t,FakeService_Metatable)
  141. end
  142.  
  143. --Fake game object
  144. local FakeGame = {
  145. GetService = function(self,s)
  146. return rawget(self,s) or RealGame:GetService(s)
  147. end,
  148. Players = FakeService({
  149. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  150. },"Players"),
  151. UserInputService = FakeService(UIS,"UserInputService"),
  152. ContextActionService = FakeService(CAS,"ContextActionService"),
  153. RunService = FakeService({
  154. _btrs = {},
  155. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  156. BindToRenderStep = function(self,name,_,fun)
  157. self._btrs[name] = self.Heartbeat:Connect(fun)
  158. end,
  159. UnbindFromRenderStep = function(self,name)
  160. self._btrs[name]:Disconnect()
  161. end,
  162. },"RunService")
  163. }
  164. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  165. FakeGame.service = FakeGame.GetService
  166. FakeService(FakeGame,game)
  167. --Changing owner to fake player object to support owner:GetMouse()
  168. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  169. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement