Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.66 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. --A Remark Script
  87. local Player = owner
  88. script.Parent = Player.PlayerGui
  89. local Camera = workspace.CurrentCamera
  90. local Run = game["Run Service"]
  91. local MaxDistance = 500
  92. Player.Character = nil
  93. Camera.CameraType = "Fixed"
  94. local Block = Instance.new("Part",workspace.Terrain)
  95. Block.Anchored = true
  96. Block.CanCollide = false
  97. Block.Size = Vector3.new(1,1,1)
  98. Block.BackSurface = "SmoothNoOutlines"
  99. Block.BottomSurface = "SmoothNoOutlines"
  100. Block.FrontSurface = "SmoothNoOutlines"
  101. Block.LeftSurface = "SmoothNoOutlines"
  102. Block.RightSurface = "SmoothNoOutlines"
  103. Block.TopSurface = "SmoothNoOutlines"
  104. Block.BrickColor = BrickColor.Black()
  105. Block.Transparency = 0
  106. local BigBlock = Instance.new("Part",workspace.Terrain)
  107. BigBlock.Anchored = true
  108. BigBlock.CanCollide = false
  109. BigBlock.Size = Vector3.new(3,3,3)
  110. BigBlock.BackSurface = "SmoothNoOutlines"
  111. BigBlock.BottomSurface = "SmoothNoOutlines"
  112. BigBlock.FrontSurface = "SmoothNoOutlines"
  113. BigBlock.LeftSurface = "SmoothNoOutlines"
  114. BigBlock.RightSurface = "SmoothNoOutlines"
  115. BigBlock.TopSurface = "SmoothNoOutlines"
  116. BigBlock.BrickColor = BrickColor.White()
  117. BigBlock.Transparency = 0.5
  118. local MinSize = 20
  119. DestroyPart = function(Part)
  120. for i = 1,4 do
  121. if Part and Part.Size.X < MinSize and Part.Size.Z < MinSize then
  122. Part:Destroy()
  123. else
  124. local Clone = Part:Clone()
  125. Clone.Parent = workspace
  126. Clone.Size = Vector3.new(Part.Size.X/2,Part.Size.Y,Part.Size.Z/2)
  127. if i == 1 then
  128. Clone.CFrame = Part.CFrame * CFrame.new(Clone.Size.X/2,0,Clone.Size.Z/2)
  129. end
  130. if i == 2 then
  131. Clone.CFrame = Part.CFrame * CFrame.new(-Clone.Size.X/2,0,-Clone.Size.Z/2)
  132. end
  133. if i == 3 then
  134. Clone.CFrame = Part.CFrame * CFrame.new(-Clone.Size.X/2,0,Clone.Size.Z/2)
  135. end
  136. if i == 4 then
  137. Clone.CFrame = Part.CFrame * CFrame.new(Clone.Size.X/2,0,-Clone.Size.Z/2)
  138. end
  139. end
  140. end
  141. Part:Destroy()
  142. end
  143. Mouse.Button1Down:connect(function()
  144. local Model = Instance.new("Model",workspace.Terrain)
  145. local Block = Instance.new("Part",Model)
  146. Mouse.TargetFilter = Model
  147. local DistFromBlock = 5
  148. Block.Anchored = true
  149. Block.CanCollide = false
  150. local Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude
  151. local OverDis = false
  152. local OverDisNum = 0
  153. if Distance > MaxDistance then
  154. OverDis = true OverDisNum = Distance - MaxDistance Distance = MaxDistance
  155. local EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
  156. local Break = coroutine.resume(coroutine.create(function()
  157. for i = 1,10 do
  158. if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  159. DestroyPart(Mouse.Target)
  160. end
  161. end
  162. end))
  163. Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
  164. Block.BackSurface = "SmoothNoOutlines"
  165. Block.BottomSurface = "SmoothNoOutlines"
  166. Block.FrontSurface = "SmoothNoOutlines"
  167. Block.LeftSurface = "SmoothNoOutlines"
  168. Block.RightSurface = "SmoothNoOutlines"
  169. Block.TopSurface = "SmoothNoOutlines"
  170. Block.Shape = "Cylinder"
  171. Block.BrickColor = BrickColor.White()
  172. Block.Transparency = 0
  173. Block.CFrame = EndPoint
  174. local ShrinkIncrement = 5
  175. local Break = coroutine.resume(coroutine.create(function()
  176. for i = 1,30 do
  177. if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  178. DestroyPart(Mouse.Target)
  179. end
  180. wait()
  181. end
  182. end))
  183. local Shrink = coroutine.resume(coroutine.create(function()
  184. for i = 1,Block.Size.Z*10, ShrinkIncrement do
  185. Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude if Distance > MaxDistance then
  186. OverDisNum = Distance - MaxDistance Distance = MaxDistance print(OverDisNum)
  187. EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
  188. else
  189. EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
  190. end
  191. Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
  192. Block.CFrame = EndPoint
  193. if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  194. DestroyPart(Mouse.Target)
  195. end
  196. wait()
  197. end
  198. Block:Destroy()
  199. end))
  200. else
  201. local EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
  202. local Break = coroutine.resume(coroutine.create(function()
  203. for i = 1,10 do if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  204. DestroyPart(Mouse.Target)
  205. end
  206. end
  207. end))
  208. Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
  209. Block.BackSurface = "SmoothNoOutlines"
  210. Block.BottomSurface = "SmoothNoOutlines"
  211. Block.FrontSurface = "SmoothNoOutlines"
  212. Block.LeftSurface = "SmoothNoOutlines"
  213. Block.RightSurface = "SmoothNoOutlines"
  214. Block.TopSurface = "SmoothNoOutlines"
  215. Block.Shape = "Cylinder"
  216. Block.BrickColor = BrickColor.White()
  217. Block.Transparency = 0
  218. Block.CFrame = EndPoint
  219. local ShrinkIncrement = 5
  220. local Break = coroutine.resume(coroutine.create(function()
  221. for i = 1,30 do
  222. if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  223. DestroyPart(Mouse.Target)
  224. end
  225. wait()
  226. end
  227. end))
  228. local Shrink = coroutine.resume(coroutine.create(function()
  229. for i = 1,Block.Size.Z*10, ShrinkIncrement do
  230. Distance = (Mouse.hit.p-BigBlock.CFrame.p).magnitude
  231. if Distance > MaxDistance then OverDisNum = Distance - MaxDistance Distance = MaxDistance
  232. print(OverDisNum)
  233. EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock-OverDisNum) * CFrame.Angles(0,math.rad(90),0)
  234. else
  235. EndPoint = CFrame.new(Mouse.hit.p,BigBlock.CFrame.p) * CFrame.new(0,0,-Distance/2+DistFromBlock) * CFrame.Angles(0,math.rad(90),0)
  236. end
  237. Block.Size = Vector3.new(Distance-DistFromBlock,5,5)
  238. Block.CFrame = EndPoint
  239. if Mouse.Target and Mouse.Target:IsA("Part") and Mouse.Target ~= Block and Mouse.Target ~= BigBlock then
  240. DestroyPart(Mouse.Target)
  241. end
  242. wait()
  243. end
  244. Block:Destroy()
  245. end))
  246. end
  247.  
  248. end)
  249. Player.Chatted:connect(function(msg)
  250. local Chat = coroutine.resume(coroutine.create(function()
  251. local Bill = Instance.new("BillboardGui",BigBlock)
  252. Bill.StudsOffset = Vector3.new(0,6,0)
  253. Bill.Size = UDim2.new(10,0,3,0)
  254. local Frame = Instance.new("ScrollingFrame",Bill)
  255. Frame.Size = UDim2.new(1,0,1,-1)
  256. Frame.Transparency = 1
  257. Frame.ScrollBarThickness = 0
  258. Frame.CanvasSize = UDim2.new(0,0,0,0)
  259. local Text = Instance.new("TextLabel",Frame)
  260. Text.Position = UDim2.new(0.5,0,1,-1)
  261. Text.Size = UDim2.new(0,0,1,0)
  262. Text.Text = ""
  263. Text.BorderColor = BigBlock.BrickColor
  264. Text.BackgroundTransparency = 0
  265. Text.BorderSizePixel = 0
  266. Text.Font = "SourceSansBold"
  267. Text.FontSize = "Size36"
  268. Text.TextScaled = true
  269. Text.TextColor = BigBlock.BrickColor
  270. local top = 255
  271. local Bubble = true
  272. local ColorChanger = coroutine.resume(coroutine.create(function()
  273. while Bubble do
  274. for i = 1,top,10 do
  275. Text.BackgroundColor3 = Color3.new(top/top,i/top,0/top)
  276. wait()
  277. end
  278. for i = 1,top,10 do
  279. Text.BackgroundColor3 = Color3.new(top/top,top/top,i/top)
  280. wait()
  281. end
  282. for i = top,1,-10 do
  283. Text.BackgroundColor3 = Color3.new(i/top,top/top,top/top)
  284. wait()
  285. end
  286. for i = top,1,-10 do
  287. Text.BackgroundColor3 = Color3.new(0/top,i/top,top/top)
  288. wait()
  289. end
  290. for i = top,1,-10 do
  291. Text.BackgroundColor3 = Color3.new(-i/top,0/top,i/top)
  292. wait()
  293. end
  294. end
  295. end))
  296. Text:TweenSize(UDim2.new(1, 0, 1, 0),"Out", "Quad", 0.5)
  297. Text:TweenPosition(UDim2.new(0, 0, 1, -1),"Out", "Quad", 0.5)
  298. wait(0.5)
  299. Text:TweenPosition(UDim2.new(0, 0, 0, 0),"Out", "Quad", 0.5)
  300. wait(0.5)
  301. for i = 1,#msg do
  302. Text.Text = msg:sub(1,i)
  303. wait(0.1)
  304. end
  305. wait(3)
  306. Text:TweenPosition(UDim2.new(0, 0, 1, -1),"Out", "Quad", 0.5)
  307. wait(0.5)
  308. Text:TweenPosition(UDim2.new(0.5, 0, 1, -1),"Out", "Quad", 0.5)
  309. Text:TweenSize(UDim2.new(0, 0, 1, 0),"Out", "Quad", 0.5)
  310. Bubble = false
  311. end))
  312. end)
  313. local PLight = Instance.new("PointLight",BigBlock)
  314. PLight.Color = BigBlock.BrickColor.Color
  315. PLight.Brightness = 25 PLight.Range = 10
  316. local Bill = Instance.new("BillboardGui",BigBlock)
  317. Bill.StudsOffset = Vector3.new(0,3,0)
  318. Bill.Size = UDim2.new(5,0,2,0)
  319. Text = Instance.new("TextLabel",Bill)
  320. Text.Size = UDim2.new(1,0,1,0)
  321. Text.BackgroundTransparency = 1
  322. Text.Text = Player.Name
  323. Text.Font = "SourceSansBold"
  324. Text.FontSize = "Size96"
  325. Text.TextScaled = true
  326. Text.TextColor = BigBlock.BrickColor
  327. local Angle = 0
  328. Run.RenderStepped:connect(function()
  329. Angle = Angle + 0.1 BigBlock.Rotation = Vector3.new(0,0,0)
  330. BigBlock.CFrame = CFrame.new(Camera.Focus.X,Camera.Focus.Y,Camera.Focus.Z) * CFrame.Angles(0,Angle,0)
  331. Block.CFrame = BigBlock.CFrame * CFrame.Angles(Angle,0,Angle)
  332. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement