Advertisement
DylanD2003

Untitled

Sep 24th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. ------------------
  2. --FIJJET SPINNUH--
  3. ------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. rs = game:GetService("RunService").RenderStepped
  13. speedo = 20
  14. mode = "Drop"
  15.  
  16. --Outfit--
  17. New = function(Object, Parent, Name, Data)
  18. local Object = Instance.new(Object)
  19. for Index, Value in pairs(Data or {}) do
  20. Object[Index] = Value
  21. end
  22. Object.Parent = Parent
  23. Object.Name = Name
  24. return Object
  25. end
  26.  
  27. local s = Instance.new("Sound")
  28.  
  29. s.Name = "Sound"
  30. s.SoundId = "846517858"
  31. s.Volume = 3
  32. s.Looped = true
  33. s.archivable = false
  34.  
  35. s.Parent = game.Workspace
  36.  
  37. wait(0)
  38.  
  39. s:play()
  40.  
  41. SpinnerWeldBlock = New("Part",chara,"SpinnerWeldBlock",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.600000024, 0.200000003, 0.599999964),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  42. Weld = New("ManualWeld",SpinnerWeldBlock,"Weld",{Part0 = SpinnerWeldBlock,Part1 = chara["Right Arm"],C1 = CFrame.new(-0.200000763, -0.899999619, -0.600000143, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  43. FIJJETSPINNUH = New("Part",chara,"FIJJETSPINNUH",{BrickColor = BrickColor.new("Bright red"),Size = Vector3.new(1.4000001, 0.200000003, 1.39999998),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.768628, 0.156863, 0.109804),})
  44. FidgetSpinnerMesh = New("SpecialMesh",FIJJETSPINNUH,"FidgetSpinnerMesh",{Offset = Vector3.new(0, 0, -0.135000005),Scale = Vector3.new(3.5, 6, 3.5),MeshId = "rbxassetid://785024366",MeshType = Enum.MeshType.FileMesh,})
  45. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  46. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  47.  
  48. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  49. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  50. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  51. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  52. TextureBox = New("TextBox",Frame,"TextureBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.3,0),Text = "(Decal ID here)"})
  53. TextureLabel = New("TextLabel",Frame,"TextureLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.2,0),Text = "Spinner Texture"})
  54. RefTraLabel = New("TextLabel",Frame,"RefTraLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.4,0),Text = "Reflect/Transparent"})
  55. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  56. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  57. SpeedLabel = New("TextLabel",Frame,"SpeedLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.6,0),Text = "Spin Speed"})
  58. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  59. ModeLabel = New("TextLabel",Frame,"ModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.8,0),Text = "Mode (Switch with Q or E)"})
  60. CurrentModeLabel = New("TextLabel",Frame,"CurrentModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.9,0),Text = "Drop"})
  61. CloseButton = New("TextButton",ScreenGui,"CloseButton",{Size = UDim2.new(0, 50, 0, 25),Position = UDim2.new(),AnchorPoint = Vector2.new(1,1),Position = UDim2.new(1,0,.5,0),Text = "Close"})
  62.  
  63. CloseButton.MouseButton1Click:connect(function()
  64. if Frame.Visible == true then
  65. Frame.Visible = false
  66. CloseButton.Text = "Open"
  67. elseif Frame.Visible == false then
  68. Frame.Visible = true
  69. CloseButton.Text = "Close"
  70. end
  71. end)
  72.  
  73. TextureBox.Changed:connect(function()
  74. FidgetSpinnerMesh.TextureId = TextureBox.Text
  75. end)
  76.  
  77. BrickColorBox.Changed:connect(function()
  78. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  79. FidgetSpinnerMesh.TextureId = ""
  80. end)
  81.  
  82. ReflectBox.Changed:connect(function()
  83. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  84. end)
  85.  
  86. TransBox.Changed:connect(function()
  87. FIJJETSPINNUH.Transparency = TransBox.Text
  88. end)
  89.  
  90. SpeedBox.Changed:connect(function()
  91. if SpeedBox.Text ~= "" then
  92. speedo = SpeedBox.Text
  93. end
  94. end)
  95.  
  96. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  97. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  98. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  99. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  100. return TEff
  101. end
  102.  
  103. --Clerp Animations--
  104. TC = chara.HumanoidRootPart.RootJoint
  105. HC = chara.Torso.Neck
  106. RAC = chara.Torso["Right Shoulder"]
  107. LAC = chara.Torso["Left Shoulder"]
  108. RLC = chara.Torso["Right Hip"]
  109. LLC = chara.Torso["Left Hip"]
  110. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  111. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  112. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  113. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  114. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  115. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  116. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  117. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  118. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  119. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  120. RW = Instance.new("Weld",HC.Parent)
  121. RW.Part1 = HC.Parent
  122. RW.Part0 = chara["Right Arm"]
  123. RW.C0 = RWF
  124.  
  125. function clerp(a,b,c)
  126. return a:lerp(b,c)
  127. end
  128.  
  129. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  130. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  131. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  132. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  133.  
  134. RW.C0 = RWF
  135.  
  136. --Idle Clerp--
  137. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  138.  
  139. function res()
  140. RW.C0 = IRWF
  141. end
  142. res()
  143.  
  144. --Mouse Functions--
  145. function onKeyDown(key)
  146. if key == "q" then
  147. mode = "Drop"
  148. CurrentModeLabel.Text = mode
  149. elseif key == "e" then
  150. mode = "Throw"
  151. CurrentModeLabel.Text = mode
  152. end
  153. end
  154. function onButton1Down()
  155. if mode == "Drop" then
  156. local spinnah = FIJJETSPINNUH:Clone()
  157. spinnah.Parent = workspace
  158. spinnah.Position = FIJJETSPINNUH.Position
  159. spinnah:BreakJoints()
  160. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  161. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  162. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  163. debby:AddItem(spinnah,60)
  164. elseif mode == "Throw" then
  165. local spinnah = FIJJETSPINNUH:Clone()
  166. spinnah.Parent = workspace
  167. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  168. spinnah:BreakJoints()
  169. debby:AddItem(spinnah,60)
  170. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  171. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  172. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  173. local faws = Instance.new("BodyForce",spinnah)
  174. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  175. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  176. spinnah.Touched:connect(function(hit)
  177. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  178. faws:Destroy()
  179. faws = nil
  180. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(10,20))
  181. spinf:Destroy()
  182. wait(5)
  183. for i = 0, 1, .1 do
  184. wait(.01)
  185. spinnah.Transparency = i
  186. end
  187. spinnah:Destroy()
  188. end
  189. end)
  190. end
  191. end
  192.  
  193. --Mouse Activation--
  194. if Mouse then
  195. Mouse.KeyDown:connect(onKeyDown)
  196. Mouse.Button1Down:connect(onButton1Down)
  197. end
  198.  
  199. --Loop--
  200. while true do
  201. rs:wait()
  202. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  203. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement