Advertisement
yoyo74456

Untitled

Sep 10th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.47 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end
  2. InternalData = {}
  3. do
  4. script.Parent = owner.Character
  5. local Event = Instance.new("RemoteEvent")
  6. Event.Name = "UserInput"
  7. local function NewFakeEvent()
  8. local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect
  9. return Fake
  10. end
  11. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  12. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  13. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  14. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  15. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  16. local function TriggerEvent(self,Event,...)
  17. local Trigger = Mouse[Event]
  18. if Trigger and Trigger.fakeEvent and Trigger.Function then
  19. Trigger.Function(...)
  20. end
  21. end
  22. Mouse.TrigEvent = TriggerEvent
  23. UserInputService.TrigEvent = TriggerEvent
  24. Event.OnServerEvent:Connect(function(FiredBy,Input)
  25. if FiredBy.Name ~= owner.Name then end
  26. if Input.MouseEvent then
  27. Mouse.Target = Input.Target
  28. Mouse.Hit = Input.Hit
  29. else
  30. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  31. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  32. return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up")
  33. end
  34. for _,Action in pairs(ContextActionService.Actions) do
  35. for _,Key in pairs(Action.Keys) do
  36. if Key==Input.KeyCode then
  37. Action.Function(Action.Name,Input.UserInputState,Input)
  38. end
  39. end
  40. end
  41. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  42. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  43. end
  44. end)
  45. InternalData["Mouse"] = Mouse
  46. InternalData["ContextActionService"] = ContextActionService
  47. InternalData["UserInputService"] = UserInputService
  48. Event.Parent = NLS([[
  49. local Player = owner
  50. local Event = script:WaitForChild("UserInput")
  51. local UserInputService = game:GetService("UserInputService")
  52. local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input)
  58. UserInputService.InputEnded:Connect(Input)
  59. local Hit,Target
  60. while wait(1/30) do
  61. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  62. Hit,Target = Mouse.Hit,Mouse.Target
  63. Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  64. end
  65. end
  66. ]],owner.Character)
  67. end
  68. RealGame = game;game = setmetatable({},{
  69. __index = function (self,Index)
  70. local Sandbox = function (Thing)
  71. if Thing:IsA("Player") then
  72. local RealPlayer = Thing
  73. return setmetatable({},{
  74. __index = function (self,Index)
  75. local Type = type(RealPlayer[Index])
  76. if Type == "function" then
  77. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  78. return function (self)
  79. return InternalData["Mouse"]
  80. end
  81. end
  82. return function (self,...)
  83. return RealPlayer[Index](RealPlayer,...)
  84. end
  85. else
  86. if Index == "PlrObj" then
  87. return RealPlayer
  88. end
  89. return RealPlayer[Index]
  90. end
  91. end;
  92. __tostring = function(self)
  93. return RealPlayer.Name
  94. end
  95. })
  96. end
  97. end
  98. if RealGame[Index] then
  99. local Type = type(RealGame[Index])
  100. if Type == "function" then
  101. if Index:lower() == "getservice" or Index:lower() == "service" then
  102. return function (self,Service)
  103. if Service:lower() == "players" then
  104. return setmetatable({},{
  105. __index = function (self2,Index2)
  106. local RealService = RealGame:GetService(Service)
  107. local Type2 = type(Index2)
  108. if Type2 == "function" then
  109. return function (self,...)
  110. return RealService[Index2](RealService,...)
  111. end
  112. else
  113. if Index2:lower() == "localplayer" then
  114. return Sandbox(owner)
  115. end
  116. return RealService[Index2]
  117. end
  118. end;
  119. __tostring = function(self)
  120. return RealGame:GetService(Service).Name
  121. end
  122. })
  123. elseif Service:lower() == "contextactionservice" then
  124. return InternalData["ContextActionService"]
  125. elseif Service:lower() == "contextactionservice" then
  126. return InternalData["UserInputService"]
  127. elseif Service:lower() == "runservice" then
  128. return setmetatable({},{
  129. __index = function(self2,Index2)
  130. local RealService = RealGame:GetService(Service)
  131. local Type2 = type(Index2)
  132. if Type2 == "function" then
  133. return function (self,...)
  134. return RealService[Index2](RealService,...)
  135. end
  136. else
  137. if Index2:lower() == "bindtorenderstep" then
  138. return function (self,Name,Priority,Function)
  139. return RealGame:GetService("RunService").Stepped:Connect(Function)
  140. end
  141. end
  142. if Index2:lower() == "renderstepped" then
  143. return RealService["Stepped"]
  144. end
  145. return RealService[Index2]
  146. end
  147. end
  148. })
  149. else
  150. return RealGame:GetService(Service)
  151. end
  152. end
  153. end
  154. return function (self,...)
  155. return RealGame[Index](RealGame,...)
  156. end
  157. else
  158. if game:GetService(Index) then
  159. return game:GetService(Index)
  160. end
  161. return RealGame[Index]
  162. end
  163. else
  164. return nil
  165. end
  166. end
  167. });Game = game;owner = game:GetService("Players").LocalPlayer;script = {}
  168. --
  169. Player = game:GetService("Players").LocalPlayer
  170. Char = Player.Character
  171. --
  172. local ShockWave = Instance.new("Part", Char)
  173. local Wave = Instance.new("SpecialMesh", ShockWave)
  174. Wave.MeshId = "http://www.roblox.com/asset/?id=20329976"
  175. ShockWave.Transparency = 1
  176. ShockWave.CanCollide = false
  177. ShockWave.Anchored = true
  178. Floating = true
  179. Attacking = false
  180. Char.Humanoid.HipHeight = 1
  181. --
  182. local root = Char.HumanoidRootPart
  183. local larm = Char["Left Arm"]
  184. local rarm = Char["Right Arm"]
  185. local lleg = Char["Left Leg"]
  186. local rleg = Char["Right Leg"]
  187. local hed = Char.Head
  188. local torso = Char.Torso
  189.  
  190. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  191. local wld = Instance.new("Weld", wp1)
  192. wld.Part0 = wp0
  193. wld.Part1 = wp1
  194. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  195. end
  196.  
  197. newWeld(torso, larm, -1.5, 0.5, 0)
  198. larm.Weld.C1 = CFrame.new(0.1, 0.6, 0.2) * CFrame.Angles(math.rad(-17,97), math.rad(168.77), math.rad(-11.14))
  199. newWeld(torso, rarm, 1.5, 0.5, 0)
  200. rarm.Weld.C1 = CFrame.new(-0.1, 0.6, 0.2) * CFrame.Angles(math.rad(-17.97), math.rad(191.23), math.rad(11.32))
  201. newWeld(torso, hed, 0, 1.5, 0)
  202. newWeld(torso, lleg, -0.5, -1, 0)
  203. lleg.Weld.C1 = CFrame.new(0, 0.9, 0) * CFrame.Angles(math.rad(-15),math.rad(180),math.rad(0.09))
  204. newWeld(torso, rleg, 0.5, -1, 0)
  205. rleg.Weld.C1 = CFrame.new(0, 0.9, 0) * CFrame.Angles(math.rad(-15),math.rad(180),math.rad(0.09))
  206. newWeld(root, torso, 0, -1, 0)
  207. torso.Weld.C1 = CFrame.new(0, -1, 0)
  208.  
  209. Mouse = Player:GetMouse()
  210. Mouse.KeyDown:connect(function(key)
  211. if key:lower() == 'e' and Attacking == false then
  212. Attacking = true
  213. hed.Anchored = true
  214. larm.Weld.C1 = CFrame.new(0, 0.9, 0.2) * CFrame.Angles(math.rad(28.24), math.rad(-171.2), math.rad(171.24))
  215. local Part1 = Instance.new("Part", larm)
  216. Part1.Anchored = true
  217. Part1.Size = Vector3.new(1,1,1)
  218. Part1.Color = Color3.fromRGB(91, 93, 105)
  219. Part1.Material = "Neon"
  220. Part1.CFrame = larm.CFrame * CFrame.new(0,-1.8,0) * CFrame.Angles(0,math.rad(-130),0)
  221. local Part2 = Instance.new("Part", larm)
  222. Part2.Anchored = true
  223. Part2.Size = Vector3.new(1,1,1)
  224. Part2.Color = Color3.fromRGB(163, 162, 165)
  225. Part2.Transparency = 0.7
  226. Part2.Material = "Neon"
  227. Part2.CFrame = larm.CFrame * CFrame.new(0,-1.8,0) * CFrame.Angles(math.rad(55.63),math.rad(-40),math.rad(-30))
  228. local Part1 = Instance.new("Part", larm)
  229. Part1.Anchored = true
  230. Part1.Size = Vector3.new(1,1,1)
  231. Part1.Color = Color3.fromRGB(99, 95, 98)
  232. Part1.Material = "Neon"
  233. Part1.CFrame = larm.CFrame * CFrame.new(0,-1.8,0) * CFrame.Angles(math.rad(-14),math.rad(63),math.rad(-27))
  234. local Attack = Instance.new("Part", game.workspace)
  235. Attack.CFrame = Mouse.Hit * CFrame.new(0,10,0)
  236. end
  237. end)
  238.  
  239. repeat
  240. local tweenService = game:GetService("TweenService")
  241.  
  242. local tweenInformation = TweenInfo.new (
  243. 1.5,
  244. Enum.EasingStyle.Linear,
  245. Enum.EasingDirection.In,
  246. 0,
  247. false,
  248. 0
  249. )
  250.  
  251. local partProperties = {
  252. HipHeight = 1.5
  253. }
  254.  
  255. local Up = tweenService:Create(Char.Humanoid,tweenInformation,partProperties)
  256. Up:Play()
  257. wait(1.5)
  258.  
  259. local tweenService = game:GetService("TweenService")
  260.  
  261. local tweenInformation = TweenInfo.new (
  262. 1.5,
  263. Enum.EasingStyle.Linear,
  264. Enum.EasingDirection.In,
  265. 0,
  266. false,
  267. 0
  268. )
  269.  
  270. local partProperties = {
  271. HipHeight = 1
  272. }
  273.  
  274. local Down = tweenService:Create(Char.Humanoid,tweenInformation,partProperties)
  275. Down:Play()
  276. wait(1.5)
  277.  
  278. if SW then
  279. SW:Destroy()
  280. end
  281. SW = ShockWave:Clone()
  282. SW.CanCollide = false
  283. SW.Anchored = true
  284. SW.CFrame = torso.CFrame * CFrame.new(0,-4,0)
  285. SW.Material = "Grass"
  286. SW.Color = Color3.fromRGB(44, 101, 29)
  287. SW.Parent = Char
  288. SW.Transparency = 0
  289. local tweenService = game:GetService("TweenService")
  290.  
  291. local tweenInformation = TweenInfo.new (
  292. 3,
  293. Enum.EasingStyle.Quad,
  294. Enum.EasingDirection.In,
  295. 0,
  296. false,
  297. 0
  298. )
  299.  
  300. local partProperties = {
  301. Scale = Vector3.new(2.5,2.5,2.5)
  302. }
  303.  
  304. local Waveout = tweenService:Create(SW.Mesh,tweenInformation,partProperties)
  305. Waveout:Play()
  306. local tweenService = game:GetService("TweenService")
  307.  
  308. local tweenInformation = TweenInfo.new (
  309. 3,
  310. Enum.EasingStyle.Quad,
  311. Enum.EasingDirection.In,
  312. 0,
  313. false,
  314. 0
  315. )
  316.  
  317. local partProperties = {
  318. Transparency = 1
  319. }
  320.  
  321. local WaveFade = tweenService:Create(SW,tweenInformation,partProperties)
  322. WaveFade:Play()
  323. until
  324. Floating == false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement